Advertisement

HipHopVM 2.2.0: slower, but more compatible

We wrote before about HipHopVM, Facebook’s high-performance PHP runtime, that can be found on Github. It is a production-ready virtual machine that delivers superior performance for PHP scripts. Recently version 2.2.0 was released and it now supports many frameworks. This is a big improvement. First we compare it with the previous version and see how it performs. We tested again on Ubuntu 12.04 (the latest LTS release).

hhvm220_graph

This graph shows the average execution time (of 10 runs) on PHP 5.3.10 (with APC), HipHopVM v2.1.0 and HipHopVM v2.2.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:

  1. bench1.php: http://www.lornajane.net/posts/2012/proof-that-php-5-4-is-twice-as-fast-as-php-5-3
  2. bench2.php: https://coderwall.com/p/il1tog
  3. bench3.php: http://php.net/manual/en/features.gc.performance-considerations.php
  4. bench4.php: http://akrabat.com/php/php-5-3-is-quicker-than-php-5-2-2/
  5. bench5.php: http://onlinephpfunctions.com/benchmarks
  6. bench6.php: http://www.synet.sk/php/en/220-php-performance-benchmark

This is the raw data:

hhvm220_data

Rewriting under HipHopVM

Symfony on Apache web server requires “mod_rewrite”. If you are running Symfony on HipHopVM you are probably looking for a “mod_rewrite” alternative. Fortunately HHVM has this feature built-in. This is how you configure the VirtualHost in the hhvm.hdf file to achieve rewriting:

VirtualHost {
    * {
        Pattern = .*
        RewriteRules {
            * {
                 pattern = ^(.*)$
                 to = index.php$1
                 qsa = true
            }
        }
    }
}

Conclusion

HipHopVM is getting more and more compatible. Still it does not run all frameworks, but is seems it is getting there. It may look like it is getting slower as it is getting more compatible. When you look at benchmark 5 & 6 you can see that it still has a good performance and that is has hardly become slower. The results from benchmark 1 are a bit worrying, but since that is just a simple object instantiation, I would not value that too much.

What do you think about these numbers? Did you get different results? Please share your thoughts in the comments below.

4 Responses to “HipHopVM 2.2.0: slower, but more compatible”

Leave a Reply