The Computer Language
Benchmarks Game

Hack programs versus PHP

by benchmark task performance

binary-trees
source secs KB gz cpu cpu load
Hack 36.00 832,084 480 35.95 1% 100% 0% 0%
PHP 175.09 1,550,168 483 174.93 98% 4% 1% 0%
fasta
source secs KB gz cpu cpu load
Hack 38.30 310,168 1109 38.28 1% 100% 0% 1%
PHP 59.28 7,936 1030 59.26 1% 0% 1% 100%
spectral-norm
source secs KB gz cpu cpu load
Hack 32.70 311,080 1195 123.86 96% 96% 96% 97%
PHP 41.23 17,104 1135 163.58 99% 99% 100% 99%
k-nucleotide
source secs KB gz cpu cpu load
Hack 53.86 554,620 1061 183.88 93% 76% 88% 87%
PHP 44.55 135,472 1060 152.16 81% 92% 76% 93%
regex-dna
source secs KB gz cpu cpu load
Hack 2.75 411,932 832 6.28 36% 48% 67% 84%
PHP 2.23 106,284 832 5.09 62% 78% 49% 42%
n-body
source secs KB gz cpu cpu load
Hack 587.35 310,580 1432 587.19 1% 79% 21% 1%
PHP 432.48 7,928 1082 432.36 0% 100% 0% 1%
mandelbrot
source secs KB gz cpu cpu load
Hack 249.48 308,012 441 249.40 77% 9% 9% 8%
PHP 134.34 132,880 863 536.04 100% 100% 100% 100%
fannkuch-redux
source secs KB gz cpu cpu load
Hack 1,224.66 307,584 440 1,224.30 0% 1% 1% 100%
PHP 321.58 29,140 1150 1,280.13 100% 100% 99% 100%
pidigits
source secs KB gz cpu cpu load
Hack 470.07 318,172 735 469.88 1% 100% 0% 1%
PHP 2.19 8,852 394 2.18 100% 1% 0% 2%
reverse-complement
source secs KB gz cpu cpu load
Hack   Bad Output
PHP 0.10 ? 297 ? 100% 9% 0% 0%
Hack

HipHop VM 3.14.5 (rel)
Compiler: tags/HHVM-3.14.5-0-gc6bf714e6468213eed377527b431e9cd4cec1432
Repo schema: 9ab3fe4281c731189b558d921eb7317b0eb2b2e6

PHP

PHP 7.0.6 (cli) (built: May 4 2016 16:00:18) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies