The Computer Language
Benchmarks Game

Haskell GHC programs versus Java

by benchmark task performance

fannkuch-redux
source secs mem gz cpu cpu load
Haskell GHC 15.41 3,280 1113 60.92 99% 98% 100% 100%
Java 18.27 31,820 1282 72.06 99% 99% 98% 98%
spectral-norm
source secs mem gz cpu cpu load
Haskell GHC 4.05 3,960 987 15.71 100% 97% 97% 95%
Java 4.38 35,388 950 16.80 96% 96% 95% 97%
n-body
source secs mem gz cpu cpu load
Haskell GHC 21.91 4,068 1883 21.91 100% 1% 0% 0%
Java 22.17 33,040 1489 22.27 100% 1% 0% 1%
reverse-complement
source secs mem gz cpu cpu load
Haskell GHC 5.85 501,324 1020 7.82 13% 8% 100% 13%
Java 3.15 680,424 2183 7.07 52% 70% 43% 63%
mandelbrot
source secs mem gz cpu cpu load
Haskell GHC 11.66 38,588 782 46.53 100% 100% 100% 100%
Java 6.10 76,520 796 23.59 97% 98% 98% 96%
binary-trees
source secs mem gz cpu cpu load
Haskell GHC 25.13 711,956 494 52.23 91% 37% 36% 45%
Java 8.39 933,808 835 28.28 82% 86% 84% 88%
fasta
source secs mem gz cpu cpu load
Haskell GHC 9.56 5,164 969 10.09 100% 2% 2% 3%
Java 2.27 43,628 2473 5.93 51% 75% 57% 81%
k-nucleotide
source secs mem gz cpu cpu load
Haskell GHC 40.22 523,084 1059 141.80 91% 88% 88% 87%
Java 8.75 385,056 1812 27.09 85% 72% 70% 85%
regex-redux
source secs mem gz cpu cpu load
Haskell GHC   Make Error
Java 0.66 45,016 929 2.03 94% 72% 77% 71%
pidigits
source secs mem gz cpu cpu load
Haskell GHC   Make Error
Java 0.28 1,028 938 0.36 43% 11% 19% 66%
Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.4.1

Java

java 10 2018-03-20
Java(TM) SE Runtime Environment 18.3 (build 10+46)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10+46, mixed mode)