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:

  • test_math 2.332 sec.
  • test_stringmanipulation : 2.321 sec.
  • test_loops : 2.346 sec.
  • test_ifelse : 1.483 sec.

2013-09-01_141139

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:

  • test_math 2.146 sec.
  • test_stringmanipulation : 2.222 sec.
  • test_loops : 1.419 sec.
  • test_ifelse : 1.087 sec.
  • Total time: 6.874 sec.

Compare the result of php 5.3. The total time is 20% shorter.
2013-09-01_141747

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.
2013-09-01_144017
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.

David Yin

David is a blogger, geek, and web developer — founder of FreeInOutBoard.com. If you like his post, you can say thank you here

One Reply to “PHP 5.5 is 20% faster than PHP5.3”

Leave a Reply

Your email address will not be published. Required fields are marked *