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.31 902,528 929 38.75 73% 76% 86% 81%
binary-trees
source secs mem gz cpu cpu load
Hack 10.87 508,460 736 36.47 87% 98% 74% 79%
Java 11.26 593,156 835 39.02 85% 88% 90% 88%
mandelbrot
source secs mem gz cpu cpu load
Hack 31.24 125,920 864 122.48 98% 98% 98% 99%
Java 7.10 90,588 796 27.92 99% 99% 98% 98%
k-nucleotide
source secs mem gz cpu cpu load
Hack 53.87 286,948 1061 185.60 91% 99% 76% 80%
Java 7.93 465,372 1802 25.11 75% 75% 75% 93%
spectral-norm
source secs mem gz cpu cpu load
Hack 31.46 115,488 1195 122.93 99% 98% 97% 98%
Java 4.29 29,884 950 16.56 96% 97% 99% 95%
fannkuch-redux
source secs mem gz cpu cpu load
Hack 216.95 118,448 1150 850.94 98% 99% 96% 100%
Java 13.74 30,368 1282 54.12 100% 98% 98% 99%
fasta
source secs mem gz cpu cpu load
Hack 40.88 116,344 1109 40.85 1% 48% 53% 1%
Java 2.13 36,036 2457 5.66 94% 58% 59% 60%
n-body
source secs mem gz cpu cpu load
Hack 619.58 118,504 1432 619.38 1% 33% 68% 1%
Java 21.54 27,092 1489 21.56 1% 1% 100% 1%
pidigits
source secs mem gz cpu cpu load
Hack   Bad Output
Java 0.23 784 938 0.24 48% 57% 9% 9%
reverse-complement
source secs mem gz cpu cpu load
Hack   Bad Output
Java 0.18 ? 1661 0.28 33% 47% 56% 18%
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)