The Computer Language
Benchmarks Game

Hack programs versus Java

by benchmark task performance

regex-redux
source secs mem gz cpu cpu load
Hack 3.92 271,128 786 3.83 30% 24% 76% 27%
Java 12.16 927,212 929 37.28 73% 81% 75% 78%
binary-trees
source secs mem gz cpu cpu load
Hack 35.88 638,536 480 35.84 98% 2% 1% 1%
Java 11.52 643,924 889 40.54 89% 92% 85% 89%
mandelbrot
source secs mem gz cpu cpu load
Hack 31.24 125,920 864 122.48 98% 98% 98% 99%
Java 5.89 89,504 796 23.08 98% 98% 98% 99%
k-nucleotide
source secs mem gz cpu cpu load
Hack 53.87 286,948 1061 185.60 91% 99% 76% 80%
Java 8.02 467,004 1802 25.57 76% 98% 73% 74%
spectral-norm
source secs mem gz cpu cpu load
Hack 31.46 115,488 1195 122.93 99% 98% 97% 98%
Java 4.29 31,428 950 16.56 97% 96% 98% 97%
fannkuch-redux
source secs mem gz cpu cpu load
Hack 216.95 118,448 1150 850.94 98% 99% 96% 100%
Java 17.74 30,048 1282 69.90 98% 98% 100% 99%
fasta
source secs mem gz cpu cpu load
Hack 40.88 116,344 1109 40.85 1% 48% 53% 1%
Java 2.14 36,192 2457 5.68 71% 58% 62% 77%
n-body
source secs mem gz cpu cpu load
Hack 619.58 118,504 1432 619.38 1% 33% 68% 1%
Java 21.50 27,240 1489 21.52 1% 1% 100% 0%
pidigits
source secs mem gz cpu cpu load
Hack   Bad Output
Java 0.24 828 938 0.24 71% 38% 8% 4%
reverse-complement
source secs mem gz cpu cpu load
Hack   Bad Output
Java 0.17 ? 1661 0.27 25% 82% 24% 33%
Hack

HipHop VM 3.18.0 (rel)
Compiler: tags/HHVM-3.18.0-0-g9b285191feb2bb1558bb6682da135263bd2a9e60
Repo schema: cc987335f4691fa6ed98336c2378d8e71a751b22

Java

java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)