Site icon David Yin's Blog

PHP 5.5 is 20% faster than PHP5.3

It is a general test on a Centos 6.4 system. The benchmark script is made by http://www.php-benchmark-script.com/. The first time I run it on the updated default Centos6.4. The php version is 5.3.3. I think it has Xcache installed. The test result is Total time: 8.482 sec. Breakdown as below:

Then I upgrade or replace the php 5.3 by php 5.5. I follow the guide on Webtactic. http://www.webtatic.com/packages/php55/ The testing result on php 5.5 as below:

Compare the result of php 5.3. The total time is 20% shorter.

Regarding loops, it is 40% faster. For ifelse, 27% faster. These two type of control functions are used very often. So the benefit gained from upgrading to PHP 5.5 will be more than 20%. Here are one more benefit from the new feature of php 5.5. I added support of Zend OPcache v7.0.2-dev on it. The total time is reduced to 6.463 sec. It optimized ifelse operation. The virtual machine, Centos 6.4 is 4cores AMD A8-3870 APU, 512 MB memory.

Conclusion: PHP 5.5 will improve the php program performance at least 20%. And also PHP 5.3 series will receive only security fixes for the next year.  It is time to upgrade PHP.

Exit mobile version