The Computer Language
Benchmarks Game

Hack programs versus PHP

by benchmark task performance

mandelbrot
source secs KB gz cpu cpu load
Hack 31.66 125,900 864 124.70 98% 99% 98% 99%
PHP 134.34 132,880 863 536.04 100% 100% 100% 100%
binary-trees
source secs KB gz cpu cpu load
Hack 35.72 638,748 480 35.66 25% 8% 16% 59%
PHP 103.82 ? 1161 ? 85% 88% 92% 75%
fannkuch-redux
source secs KB gz cpu cpu load
Hack 218.04 116,160 1150 855.47 100% 97% 97% 99%
PHP 321.58 29,140 1150 1,280.13 100% 100% 99% 100%
fasta
source secs KB gz cpu cpu load
Hack 41.31 116,872 1109 41.28 1% 1% 100% 1%
PHP 59.28 7,936 1030 59.26 1% 0% 1% 100%
spectral-norm
source secs KB gz cpu cpu load
Hack 31.35 117,884 1195 122.79 98% 99% 98% 98%
PHP 41.23 17,104 1135 163.58 99% 99% 100% 99%
regex-dna
source secs KB gz cpu cpu load
Hack 2.60 217,796 832 6.02 41% 82% 46% 68%
PHP 2.23 106,284 832 5.09 62% 78% 49% 42%
k-nucleotide
source secs KB gz cpu cpu load
Hack 54.82 348,632 1061 186.09 90% 88% 89% 74%
PHP 44.55 135,472 1060 152.16 81% 92% 76% 93%
n-body
source secs KB gz cpu cpu load
Hack 614.53 113,132 1432 614.33 1% 1% 0% 100%
PHP 432.48 7,928 1082 432.36 0% 100% 0% 1%
reverse-complement
source secs KB gz cpu cpu load
Hack   Bad Output
PHP 0.10 ? 297 ? 100% 9% 0% 0%
pidigits
source secs KB gz cpu cpu load
Hack   Bad Output
PHP 0.13 ? 394 0.11 0% 0% 0% 92%
Hack

HipHop VM 3.17.1 (rel)
Compiler: tags/HHVM-3.17.1-0-gdb3429c2130e5f7539bfd550c27a6bea9444b669
Repo schema: 68c9b831b56bea5d8c90f6fca5ea358cdaaea626

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