The Computer Language
Benchmarks Game

Hack versus PHP fastest programs

by faster benchmark performance

binary-trees
source secs mem gz cpu cpu load
Hack 11.36 396,464 745 34.48 75% 69% 83% 82%
PHP 66.56 736,600 868 244.42 94% 92% 91% 96%
fasta
source secs mem gz cpu cpu load
Hack 42.43 131,076 1148 42.35 0% 0% 1% 100%
PHP 59.12 9,412 1062 59.11 40% 0% 1% 60%
spectral-norm
source secs mem gz cpu cpu load
Hack 33.49 131,980 1229 131.17 98% 99% 98% 98%
PHP 37.09 20,208 1152 147.78 100% 100% 100% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Hack 248.88 131,976 1163 975.17 98% 98% 97% 100%
PHP 233.57 34,748 1160 929.49 100% 99% 100% 99%
regex-redux
source secs mem gz cpu cpu load
Hack 3.68 281,608 822 3.43 29% 73% 44% 30%
PHP 2.63 270,048 816 2.46 38% 39% 85% 38%
mandelbrot
source secs mem gz cpu cpu load
Hack 165.57 130,400 449 165.46 1% 35% 65% 1%
PHP 118.07 137,452 875 471.57 100% 100% 100% 100%
n-body
source secs mem gz cpu cpu load
Hack 628.76 132,048 1439 628.57 16% 0% 1% 84%
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.50 ? 438 ? 6% 8% 8% 92%
pidigits
source secs mem gz cpu cpu load
Hack   Bad Output
PHP 0.12 ? 399 0.10 0% 55% 100% 0%
k-nucleotide
source secs mem gz cpu cpu load
Hack   Timed Out
PHP 0.52 68,504 1079 1.45 87% 51% 57% 94%
Hack

HipHop VM 3.27.2 (rel)
Compiler: 1534356719_967452753
Repo schema: 95ea01991dc819bb6fb84515da43b28a97e0ac62

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