HipHopVM is Facebook’s high-performance PHP runtime, that is built to be a production-ready virtual machine that delivers superior performance. Facebook was using a PHP-to-C++ compiler (HPHPc), but is now moving to HipHopVM (HHVM) to unify their production and development environments.
PHP 5.3.10 is the current version of PHP on Ubuntu 12.04 (the latest LTS release). On Ubuntu 12.04 HipHopVM has binary packages available (v2.1.0).
This graph shows the average execution time (of 10 runs) on both PHP 5.3.10 (with APC) and HipHopVM v2.1.0. The Y-axis shows the amount of seconds the execution took (on average) and the numbers on the X-axis represent the following benchmark scripts:
- bench1.php: http://www.lornajane.net/posts/2012/proof-that-php-5-4-is-twice-as-fast-as-php-5-3
- bench2.php: https://coderwall.com/p/il1tog
- bench3.php: http://php.net/manual/en/features.gc.performance-considerations.php
- bench4.php: http://akrabat.com/php/php-5-3-is-quicker-than-php-5-2-2/
- bench5.php: http://onlinephpfunctions.com/benchmarks
- bench6.php: http://www.synet.sk/php/en/220-php-performance-benchmark
This is the raw data:
Note that the memory usage (in bench3.php) is also different:
The differences were smaller and less consistent than I expected. Also I was disappointed that HipHopVM did not run my code.
NB: HHVM v2.2.0 is out and it runs Symfony!
What do you think about these numbers? Please share your thoughts in the comments below.