Hi!

The problem is that the loading/unloading of the scanner and parser can
be significant overhead, and by cramming all code into a single file,
can result in a 10%-30% performance improvement over code in separate
files, even with an opcode cache.  This has been verified independently

Not only this, but the fact that executing 50 different op-arrays, with all setup and teardown that happens on the way, is definitely slower than 1 op-array, and also the fact that early binding on compile stage may be a bit faster when we are dealing with a lot of classes and carefully arrange them. As always, note that the benchmark was loading huge amount of classes and doing nothing but, so don't expect your real-life app to get anywhere near 30% on that. Actually, I have no idea how hard it would be to make big app using a lot of modules and lot of different classes in different modules to work this way, so I'm not even sure it's practical or will give any benefit - since you might be loading a bunch of code you'd never need. But the effect does exist.
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to