We are getting there. With the recent patches from Andrei and Dmitry
here is what it looks like on this AMD test server of mine:
http://www.php.net/~rasmus/numbers.png
The MySQL test I added is just a simple select query using ext/mysql.
It looks like this: http://www.php.net/~rasmus/mysql.phps
The calltrees with a minimum node weight of 1.5% of the execution time
for 4.4.3 and current 5.1.3 for that MySQL script look like this:
http://www.php.net/~rasmus/php443.png
http://www.php.net/~rasmus/php513.png
The corresponding raw calltree files that you can load into kcachegrind are:
http://www.php.net/~rasmus/php443.out
http://www.php.net/~rasmus/php513.out
I reset the counters after server startup this time to get cleaner numbers.
Note that Andrei's latest patch eliminates ap_add_common_vars and
ap_add_cgi_vars that you see in the 443 tree adding up to exactly 9% of
the execution time there. Now in 513 that is replaced by
php_populate_subprocess_env which takes 1.91% which is where Andrei's 7%
speedup claim comes from. We should apply this to 4.4.3 as well.
The only other place I see potentially low-hanging fruit now is in
zend_ini_deactivate. It might be possible to short circuit that
function and have it only restore ini values we know have changed by
keeping track of that in zend_alter_ini_entry. 1.74% of the time spent
there, so perhaps not worth the effort.
Next up, magic compiler tricks to speed up the executor. But that will
take a while longer.
-Rasmus
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php