Benchmark of PHP Branches 3.0 through 5.3-CVS

As people keep asking me for an update to my previous benchmarks (PHP / GCC / ICC Benchmark, PHP 5.1 / GCC Benchmark (Update), and PHP 5.1 Performance, I quickly ran a new benchmark today.
The image above shows a stacked Bar Chart rendered using the Cairo backend of the Graph eZ Component of benchmark data from the PHP branches 3.0 through 5.3-CVS.
- We can clearly see that the introduction of bytecode generation/interpretation in PHP 4 gave a huge performance boost (PHP 4 is 6.5 times faster than PHP 3 for raw execution speed).

- The focus of PHP 5.0 was on features, not performance.
- The focus of PHP 5.1 was on performance and the new executer delivered on its promise (PHP 5.1 is 2.5 times faster than PHP 4.4 and PHP 5.0 for raw execution speed).
- The focus of PHP 5.2 was on stability.

- PHP 5.3 brings new features (namespaces, late statics binding, and the garbage collector, for instance) but the refactoring of the argument stack, for example, and other optimization patches have lead to a measurable performance improvement (PHP 5.3 is 1.2 times faster than PHP 5.2 for raw execution speed).
A modified version of the Zend/bench.php that is compatible with earlier versions of PHP has been used during the benchmark.
The PHP binaries were compiled using gcc (GCC) 4.2.3 (Ubuntu 4.2.3-1ubuntu1) and CFLAGS="-march=native -mtune=native -O2 -pipe" on an IBM ThinkPad X60s with an Intel Core Duo L2400 CPU running Linux 2.6.24-5-generic (Ubuntu Hardy Heron).
The extended body of this blog entry contains the raw benchmark data.
PHP 3.0.18 PHP 4.3.11 PHP 4.4.7 PHP 5.0.5 PHP 5.1.6 PHP 5.2.5 PHP_5_3 -------------------------------------------------------------------------------------------------------- simple 7.958 1.630 1.611 1.351 0.453 0.416 0.382 simplecall 5.044 0.836 0.828 0.804 0.502 0.496 0.456 simpleucall 6.252 1.207 1.151 1.140 0.790 0.794 0.750 simpleudcall 6.267 1.367 1.329 1.259 0.898 0.919 0.771 mandel 26.184 6.454 6.234 5.536 1.268 1.265 1.016 mandel2 32.621 6.816 6.618 5.778 1.617 1.594 1.267 ary(50000) 0.666 0.146 0.144 0.134 0.066 0.057 0.053 ary2(50000) 0.420 0.123 0.122 0.121 0.060 0.044 0.043 ary3(2000) 13.224 2.301 2.288 1.992 0.671 0.630 0.556 fibo(30) 18.732 3.549 3.507 3.312 2.265 2.334 1.908 hash1(50000) 0.826 0.192 0.189 0.177 0.104 0.097 0.089 heapsort(20000) 1.839 1.106 1.097 1.009 0.331 0.334 0.286 matrix(20) 5.008 1.071 1.075 0.963 0.289 0.296 0.293 nestedloop(12) 14.304 2.346 2.351 2.124 0.659 0.672 0.616 sieve(30) 6.635 0.881 0.865 0.826 0.308 0.291 0.264 strcat(200000) 49.516 0.120 0.118 0.117 0.063 0.047 0.045 -------------- ------- ------ ------ ------ ------ ----- ----- Total 195.497 30.145 29.527 26.642 10.343 10.287 8.794
07/02/2008 at 13:24 Permalink
Reply
07/02/2008 at 13:31 Permalink
Reply
20/08/2009 at 16:08 Permalink
Yes, I'm a pedant, I know :)
Reply