The Computer Language
Benchmarks Game

Hack programs versus PHP

by benchmark task performance

binary-trees
source secs mem gz cpu cpu load
Hack 10.90 351,656 742 34.16 86% 87% 81% 63%
PHP 79.01 736,908 1040 222.04 91% 95% 0% 95%
mandelbrot
source secs mem gz cpu cpu load
Hack 42.45 99,020 877 166.87 98% 99% 99% 99%
PHP 118.07 137,452 875 471.57 100% 100% 100% 100%
fasta
source secs mem gz cpu cpu load
Hack 41.54 86,892 1147 41.52 69% 4% 4% 32%
PHP 59.12 9,412 1062 59.11 40% 0% 1% 60%
spectral-norm
source secs mem gz cpu cpu load
Hack 31.83 88,408 1212 124.68 98% 98% 98% 99%
PHP 37.09 20,208 1152 147.78 100% 100% 100% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Hack 226.71 86,800 1160 894.82 100% 99% 99% 99%
PHP 233.57 34,748 1160 929.49 100% 99% 100% 99%
regex-redux
source secs mem gz cpu cpu load
Hack 3.44 238,608 815 3.18 34% 31% 44% 73%
PHP 2.63 270,048 816 2.46 38% 39% 85% 38%
k-nucleotide
source secs mem gz cpu cpu load
Hack 59.22 293,544 1081 201.51 90% 89% 77% 88%
PHP 41.39 242,044 1079 133.27 83% 76% 73% 91%
n-body
source secs mem gz cpu cpu load
Hack 666.77 88,744 1439 666.62 9% 1% 1% 91%
PHP 353.84 9,220 1082 353.77 0% 100% 1% 0%
reverse-complement
source secs mem gz cpu cpu load
Hack   Bad Output
PHP 0.04 ? 438 0.03 25% 100% 75% 25%
pidigits
source secs mem gz cpu cpu load
Hack   Bad Output
PHP 0.12 ? 399 0.10 0% 55% 100% 0%
Hack

HipHop VM 3.21.0 (rel)
Compiler: 3.21.0+dfsg-2
Repo schema: 1c159cf2047dca5f4a3363b2138a33e14a1e99fa

PHP

PHP 7.2.0 (cli) (built: Nov 30 2017 10:13:12) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies