I ported aobench from C to PHP then run it on HHVM (HipHop PHP).
https://gist.github.com/tai2/5151955
Below is a benchmark result.
host | time(sec) | index |
---|---|---|
C(gcc -O2) | 1.19 | 1 |
Zend PHP | 285.01 | 240 |
HHVM(JIT OFF) | 185.70 | 156 |
HHVM(JIT ON) | 52.19 | 44 |
My environment is Ubuntu 12.04 on Parallels(virtual machine) on Mac OSX(Because I don't have any Linux machines). So there may be a bit of overhead although C implementation score is even 1.15 sec on native Mac environment. CPU is 1.7GHz Core i5 and 1 core is assigned to Parallels.
By the way Ubuntu 12.04 is the easiest platform to try HHVM currently.
Taiju Muto 2013.3.15