The Computer Language
Benchmarks Game

Haskell GHC versus Java fastest programs

by faster benchmark performance

fannkuch-redux
source secs mem gz cpu cpu load
Haskell GHC 15.41 3,280 1113 60.92 99% 98% 100% 100%
Java 17.91 31,560 1282 70.25 99% 98% 99% 97%
spectral-norm
source secs mem gz cpu cpu load
Haskell GHC 4.05 3,960 987 15.71 100% 97% 97% 95%
Java 4.27 32,960 950 16.41 95% 97% 98% 96%
n-body
source secs mem gz cpu cpu load
Haskell GHC 21.91 4,068 1883 21.91 100% 1% 0% 0%
Java 22.00 32,496 1489 22.07 1% 100% 0% 1%
mandelbrot
source secs mem gz cpu cpu load
Haskell GHC 11.66 38,588 782 46.53 100% 100% 100% 100%
Java 6.96 76,748 796 27.07 98% 98% 96% 98%
reverse-complement
source secs mem gz cpu cpu load
Haskell GHC 5.85 501,324 1020 7.82 13% 8% 100% 13%
Java 3.31 626,956 2183 7.44 56% 60% 83% 45%
fasta
source secs mem gz cpu cpu load
Haskell GHC 9.56 5,164 969 10.09 100% 2% 2% 3%
Java 2.32 42,556 2473 6.24 73% 85% 49% 63%
k-nucleotide
source secs mem gz cpu cpu load
Haskell GHC 40.22 523,084 1059 141.80 91% 88% 88% 87%
Java 8.66 385,768 1812 26.52 76% 81% 74% 76%
regex-redux
source secs mem gz cpu cpu load
Haskell GHC   Make Error
Java 0.57 39,944 929 1.71 84% 63% 72% 81%
pidigits
source secs mem gz cpu cpu load
Haskell GHC   Make Error
Java 0.26 912 938 0.33 0% 31% 77% 27%
binary-trees
source secs mem gz cpu cpu load
Haskell GHC   Make Error
Java 0.28 1,040 835 0.43 25% 38% 19% 79%
Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.4.1

Java

openjdk 11 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)