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 10.38 634,548 929 29.48 70% 64% 69% 82%
binary-trees
source secs mem gz cpu cpu load
Hack 10.87 508,460 736 36.47 87% 98% 74% 79%
Java 8.58 966,808 835 28.98 86% 84% 90% 81%
mandelbrot
source secs mem gz cpu cpu load
Hack 31.24 125,920 864 122.48 98% 98% 98% 99%
Java 6.08 77,056 796 23.61 97% 97% 99% 97%
k-nucleotide
source secs mem gz cpu cpu load
Hack 53.87 286,948 1061 185.60 91% 99% 76% 80%
Java 8.38 375,988 1802 26.25 73% 97% 70% 74%
spectral-norm
source secs mem gz cpu cpu load
Hack 31.46 115,488 1195 122.93 99% 98% 97% 98%
Java 4.25 36,364 950 16.30 97% 96% 95% 97%
fannkuch-redux
source secs mem gz cpu cpu load
Hack 216.95 118,448 1150 850.94 98% 99% 96% 100%
Java 15.09 34,764 1282 59.26 99% 98% 98% 100%
fasta
source secs mem gz cpu cpu load
Hack 40.88 116,344 1109 40.85 1% 48% 53% 1%
Java 2.32 46,816 2457 6.37 61% 60% 96% 60%
n-body
source secs mem gz cpu cpu load
Hack 619.58 118,504 1432 619.38 1% 33% 68% 1%
Java 22.56 35,208 1424 22.65 99% 1% 1% 1%
pidigits
source secs mem gz cpu cpu load
Hack   Bad Output
Java 0.30 856 938 0.37 45% 7% 17% 71%
reverse-complement
source secs mem gz cpu cpu load
Hack   Bad Output
Java 0.25 952 2124 0.46 32% 42% 35% 91%
Hack

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

Java

java 9
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)