PHP 7.0 vs. HHVM 3.10 Performance Tests
Written by Michael Larabel in Software on 14 November 2015. Page 1 of 2. 6 Comments

With PHP 7.0 RC7 being the final development version of PHP 7, which is expected to be officially release at the end of the month, I've carried out some fresh benchmarks of PHP using our in-house benchmarking software. Compared in this latest PHP 7 benchmarking comparison is PHP 5.5 as packaged on Ubuntu 14.04 LTS and then comparing fresh builds of PHP 5.6.15 and PHP 7.0.0 RC7. On the HHVM side was using Facebook's HHVM 3.10.1 release as packaged for Ubuntu 14.04 LTS.

These PHP and HHVM benchmarks were done on two distinctly different systems: an Intel Ivy Bridge laptop and an Intel Xeon Haswell-E workstation. Both systems were running Ubuntu 14.04 LTS 64-bit.

The benchmark being run is the Phoronix Test Suite own built-in self-test of its PHP hot code paths. The work mostly comes down to a lot of file read/writes, basic math, PHP DOM interactions when it comes to generating XML SVG graphs, etc. Those wishing to reproduce the testing can grab Phoronix-Test-Suite from GitHub and run phoronix-test-suite debug-self-test to run it straight-forward or once installed running phoronix-test-suite benchmark pts-self-test will wrap it in a self-hosting manner to generate the result graphs, etc. The same Phoronix Test Suite 6.0-Hammerfest near-final revision was used for testing. When building PHP from source for this testing, it was configured with just --enable-xml and --enable-zip as the only extra requirements for getting the Phoronix Test Suite running from the command line.

First up are the results from the ASUS Ivy Bridge ultrabook:

Interestingly, PHP 7.0.0 RC7 is running past HHVM 3.10.1 by a noticeable margin! Again, this is just with the Phoronix Test Suite test case, which is an interesting take compared to say running a WordPress benchmark where the HHVM/PHP developers have already tuned for it, etc. The Phoronix Test Suite also just depends upon PHP CLI without a web server or other caching mechanisms. Besides managing to beat out HHVM 3.10, PHP 7.0 was the better part of three times faster than PHP 5.5/5.6.

With the render-test sub-set that just comes down to a lot of XML processing and then generating SVG graphs from that data, PHP 7.0 RC7 was almost twice as fast as HHVM 3.10.1.

Where HHVM 3.10.1 did win though was when it came to peak memory use. PHP 7.0 RC7 didn't improve much over PHP 5.5/5.6 at least in this test when it came to memory usage while HHVM 3.10 peaked at only 140MB rather than 180MB.

On the next page are the results from the 20-thread Intel Xeon E5 v3 Haswell system.



Related Articles
Trending Linux News