The Computer Language
Benchmarks Game

Hack programs versus Java

by benchmark task performance

regex-redux
source secs mem gz cpu cpu load
Hack 3.44 238,608 815 3.18 34% 31% 44% 73%
Java 10.34 627,224 929 29.88 74% 72% 65% 79%
binary-trees
source secs mem gz cpu cpu load
Hack 10.90 351,656 742 34.16 86% 87% 81% 63%
Java 8.34 893,008 835 28.20 87% 79% 96% 81%
k-nucleotide
source secs mem gz cpu cpu load
Hack 59.22 293,544 1081 201.51 90% 89% 77% 88%
Java 8.70 375,568 1812 27.17 80% 72% 74% 88%
mandelbrot
source secs mem gz cpu cpu load
Hack 42.45 99,020 877 166.87 98% 99% 99% 99%
Java 6.04 76,528 796 23.34 98% 97% 97% 97%
spectral-norm
source secs mem gz cpu cpu load
Hack 31.83 88,408 1212 124.68 98% 98% 98% 99%
Java 4.23 34,472 950 16.27 96% 97% 97% 96%
fannkuch-redux
source secs mem gz cpu cpu load
Hack 226.71 86,800 1160 894.82 100% 99% 99% 99%
Java 17.26 32,116 1282 67.75 98% 99% 97% 99%
fasta
source secs mem gz cpu cpu load
Hack 41.54 86,892 1147 41.52 69% 4% 4% 32%
Java 2.33 43,924 2473 6.07 53% 71% 63% 74%
n-body
source secs mem gz cpu cpu load
Hack 666.77 88,744 1439 666.62 9% 1% 1% 91%
Java 22.10 33,136 1429 22.20 31% 1% 1% 70%
pidigits
source secs mem gz cpu cpu load
Hack   Bad Output
Java 0.31 1,868 938 0.37 27% 14% 19% 72%
reverse-complement
source secs mem gz cpu cpu load
Hack   Bad Output
Java 0.26 1,928 2183 0.44 32% 46% 73% 35%
Hack

HipHop VM 3.21.0 (rel)
Compiler: 3.21.0+dfsg-2
Repo schema: 1c159cf2047dca5f4a3363b2138a33e14a1e99fa

Java

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