The Computer Language
Benchmarks Game

Hack programs versus PHP

by benchmark task performance

binary-trees
source secs KB gz cpu cpu load
Hack 34.81 443,884 480 34.76 1% 99% 0% 1%
PHP 103.82 ? 1161 ? 85% 88% 92% 75%
mandelbrot
source secs KB gz cpu cpu load
Hack 78.77 124,852 864 312.65 100% 99% 100% 99%
PHP 134.34 132,880 863 536.04 100% 100% 100% 100%
fasta
source secs KB gz cpu cpu load
Hack 39.32 112,872 1109 39.30 0% 100% 1% 1%
PHP 59.28 7,936 1030 59.26 1% 0% 1% 100%
spectral-norm
source secs KB gz cpu cpu load
Hack 31.74 114,396 1195 123.79 97% 98% 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.56 214,624 832 6.08 67% 77% 50% 48%
PHP 2.23 106,284 832 5.09 62% 78% 49% 42%
k-nucleotide
source secs KB gz cpu cpu load
Hack 53.79 353,272 1061 180.79 83% 89% 77% 90%
PHP 44.55 135,472 1060 152.16 81% 92% 76% 93%
n-body
source secs KB gz cpu cpu load
Hack 580.21 111,488 1432 580.05 1% 1% 100% 0%
PHP 432.48 7,928 1082 432.36 0% 100% 0% 1%
fannkuch-redux
source secs KB gz cpu cpu load
Hack 605.23 114,808 1150 2,396.30 100% 99% 98% 100%
PHP 321.58 29,140 1150 1,280.13 100% 100% 99% 100%
pidigits
source secs KB gz cpu cpu load
Hack 470.01 120,256 735 469.83 100% 1% 1% 1%
PHP 2.19 8,852 394 2.18 100% 1% 0% 2%
reverse-complement
source secs KB gz cpu cpu load
Hack   Bad Output
PHP 0.10 ? 297 ? 100% 9% 0% 0%
Hack

HipHop VM 3.15.2 (rel)
Compiler: tags/HHVM-3.15.2-0-g83ac3e5e3f5657be0cf4c55884044f86a7818b90
Repo schema: 608339137764e8365964a1adaa7a27d125b6076f

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