Re: call_user_func performance and dynamic code

From: Date: Mon, 23 May 2011 19:29:12 +0000
Subject: Re: call_user_func performance and dynamic code
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-52508@lists.php.net to get a copy of this message
On Mon, May 23, 2011 at 20:30, Stas Malyshev <smalyshev@sugarcrm.com> wrote: > Hi! > >> I'd like to ask a question about call_user_func/_array performance and >> the use of runtime variables to call functions and methods from the >> PHP internals perspective. > > There are two separate issues here: real-life PHP application performance > and internal engine performance. If you are interested in the former, please > do not read the rest of the message, instead please read this: > > My experience (10+ years of working with PHP) shows that pretty much no > application ever depends on its performance for such things. Most > applications aren't even CPU-bound and those who are, their performance very > rarely depends on how long it takes to make a function call, except for very > small number of special cases. So unless your profiling of your specific > application (not an artificial benchmark!) clearly shows this to be a > problem - it does not matter. Although you are correct when saying *most* apps, this shouldn't matter. However. It matters a lot to f.e. applications reading large XML files using XMLReader. Take PhD as an example, I think we saved over a minute few years ago when we profiled this. Just pointing out that there are perfectly valid usecase to do give this a thought :) -Hannes

« previous php.internals (#52508) next »