fast_call_user_function

php.internals

Sterling Hughes

23 years ago
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