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.74 31,900 1282 69.78 99% 98% 99% 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.41 35,028 950 16.79 96% 97% 98% 95%
n-body
source secs mem gz cpu cpu load
Haskell GHC 21.91 4,068 1883 21.91 100% 1% 0% 0%
Java 22.19 33,272 1489 22.28 35% 2% 66% 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.18 672,272 2183 7.17 67% 46% 43% 77%
mandelbrot
source secs mem gz cpu cpu load
Haskell GHC 11.66 38,588 782 46.53 100% 100% 100% 100%
Java 6.13 76,876 796 23.60 96% 96% 96% 97%
binary-trees
source secs mem gz cpu cpu load
Haskell GHC 25.13 711,956 494 52.23 91% 37% 36% 45%
Java 8.29 930,040 835 28.13 78% 94% 85% 86%
fasta
source secs mem gz cpu cpu load
Haskell GHC 9.56 5,164 969 10.09 100% 2% 2% 3%
Java 2.29 43,724 2473 6.16 67% 76% 59% 70%
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 384,756 1812 26.91 69% 88% 81% 75%
regex-redux
source secs mem gz cpu cpu load
Haskell GHC   Make Error
Java 0.65 45,356 929 2.01 73% 88% 77% 75%
pidigits
source secs mem gz cpu cpu load
Haskell GHC   Make Error
Java 0.29 1,004 938 0.36 21% 71% 33% 14%
Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.4.1

Java

java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)