PHP NG now nearly TWICE as fast as PHP 5.6

correction: php core developers have urged that it is improper to call this version “5.7” (despite the versioning file stating so)

PHP 5.7 PHP NG is still in alpha development, however it is starting to show breathtaking performance improvements over 5.6 while maintaining virtually complete compatibility.

Dmitry Stogov has been hard at work since his first announcement in mid-January 2014 and milestone update in early-May to keep folding in more and more ideas to increase PHP speed (with significant contributions by Xinchen Hui, Nikita Popov and others).

Six months later in mid-July, their efforts are really bearing fruit and PHP 5.7 NG is about to become nearly 100% faster than PHP 5.6 when rendering the front page of a stock WordPress 3.6 installation:

PHP 5.6, 1000 renderings of WP front page = 26.756 seconds

PHP NG, 1000 renderings of WP front page = 14.810 seconds

and he is not even done yet, based on all his proposals and notes as you can follow on http://wiki.php.net/phpng

The secret to this performance increase is that nearly 60% of cpu instructions have been “retired” by more efficient code:

PHP 5.6, 100 renderings = 9,413,106,833 cpu instructions

PHP NG, 100 renderings = 3,627,440,773 cpu instructions

Because most bundled extensions are now finally working with PHP 5.7 NG, you can easily build it for yourself to play with and benchmark independently. My own tests show the performance increase to be completely genuine and breathtaking.

PHP 5.7 NG will be a tremendous advantage for servers around the world. While it is highly unlikely it will be suitable for production use this year, hopefully early 2015 will bring stable betas and maybe even release candidates.

Previously the only other option to get performance like this would have been the HipHop Virtual Machine but that is hard to configure and does not offer complete compatibility, while PHP 5.7 should be a “drop in” replacement for most 5.x versions.