# small performance improvement to number stuff

- Thread: https://externals.io/message/1835
- Original archive: https://news-web.php.net/php.internals/1835
- Started by Sterling Hughes on 2003-05-21T01:03:43+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #1835 — Sterling Hughes — 2003-05-21T01:03:43+00:00

URL: https://externals.io/message/1835#1835

Hey,

Attached is small patch which optimizes the
zendi_convert_scalar_to_number() function, by only calling
convert_scalar_to_number when it is required.  This is a nice speedup of
numerical operations, as its not very often you do numerical operations
on strings (at least not as often as you do them on numbers :)

-Sterling

-- 
"Science is like sex: sometimes something useful comes out, 
but that is not the reason we are doing it." 
    - Richard Feynman
