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.40 395,744 745 36.91 73% 80% 86% 86%
PHP 65.20 736,468 868 235.57 93% 94% 92% 98%
fasta
source secs mem gz cpu cpu load
Hack 42.41 131,316 1148 42.32 41% 44% 0% 17%
PHP 59.12 9,412 1062 59.11 40% 0% 1% 60%
spectral-norm
source secs mem gz cpu cpu load
Hack 35.65 132,492 1229 139.40 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 255.85 131,508 1163 1,005.29 98% 99% 96% 100%
PHP 233.57 34,748 1160 929.49 100% 99% 100% 99%
mandelbrot
source secs mem gz cpu cpu load
Hack 165.27 130,272 449 165.10 100% 1% 1% 0%
PHP 118.07 137,452 875 471.57 100% 100% 100% 100%
regex-redux
source secs mem gz cpu cpu load
Hack 3.72 283,068 822 3.46 31% 37% 78% 30%
PHP 2.63 270,048 816 2.46 38% 39% 85% 38%
n-body
source secs mem gz cpu cpu load
Hack 634.31 132,720 1439 634.11 1% 100% 1% 0%
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.1 (rel)
Compiler: 1532025848_857759529
Repo schema: 6f2a65dfa3a360d8c159fe76a8bee0e26ba4e45a

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