The Computer Language
Benchmarks Game

Hack programs versus PHP

by benchmark task performance

mandelbrot
source secs KB gz cpu cpu load
Hack 31.24 125,920 864 122.48 98% 98% 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.88 638,536 480 35.84 98% 2% 1% 1%
PHP 103.82 ? 1161 ? 85% 88% 92% 75%
fannkuch-redux
source secs KB gz cpu cpu load
Hack 216.95 118,448 1150 850.94 98% 99% 96% 100%
PHP 321.58 29,140 1150 1,280.13 100% 100% 99% 100%
fasta
source secs KB gz cpu cpu load
Hack 40.88 116,344 1109 40.85 1% 48% 53% 1%
PHP 59.28 7,936 1030 59.26 1% 0% 1% 100%
spectral-norm
source secs KB gz cpu cpu load
Hack 31.46 115,488 1195 122.93 99% 98% 97% 98%
PHP 41.23 17,104 1135 163.58 99% 99% 100% 99%
regex-dna
source secs KB gz cpu cpu load
Hack 2.61 219,700 832 5.89 67% 51% 66% 47%
PHP 2.23 106,284 832 5.09 62% 78% 49% 42%
k-nucleotide
source secs KB gz cpu cpu load
Hack 53.87 286,948 1061 185.60 91% 99% 76% 80%
PHP 44.55 135,472 1060 152.16 81% 92% 76% 93%
n-body
source secs KB gz cpu cpu load
Hack 619.58 118,504 1432 619.38 1% 33% 68% 1%
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.18.0 (rel)
Compiler: tags/HHVM-3.18.0-0-g9b285191feb2bb1558bb6682da135263bd2a9e60
Repo schema: cc987335f4691fa6ed98336c2378d8e71a751b22

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