# fast_call_user_function

- Thread: https://externals.io/message/1736
- Original archive: https://news-web.php.net/php.internals/1736
- Started by Sterling Hughes on 2003-05-19T17:00:50+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

---

## #1736 — Sterling Hughes — 2003-05-19T17:00:50+00:00

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

Hi,

Attached is a patch which adds a new function
fast_call_user_function().  fast_call_user_function allows you to cache
the lookups of function calls, this way when you call the same function
repeatedly (as in `usort()` or any callback code), it doesn't need to be
looked up over and over and over and over and over again.

I've ported `usort()` and friends over to using fast_call_user_function()
and it resulted in around a 15% speedup.  If no one objects I'm going to
commit this to Zend, and then make the necessary changes in the code (at
least in ext/standard).  

-Sterling
-- 
"C makes it easy to shoot yourself in the foot; C++ makes it harder,  
 but when you do, it blows away your whole leg." 
    - Bjarne Stroustrup
