On Mon, May 23, 2011 at 20:30, Stas Malyshev <[email protected]> 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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
