The Computer Language
Benchmarks Game

Haskell GHC versus Java fastest programs

by faster benchmark performance

spectral-norm
source secs mem gz cpu cpu load
Haskell GHC 4.06 3,620 987 15.71 97% 99% 97% 95%
Java 4.26 33,572 950 16.39 96% 96% 98% 95%
n-body
source secs mem gz cpu cpu load
Haskell GHC 21.99 3,984 1883 86.80 99% 98% 100% 99%
Java 22.00 32,272 1489 22.07 1% 0% 0% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Haskell GHC 18.17 4,024 842 71.56 96% 99% 100% 99%
Java 17.98 31,180 1282 70.57 97% 99% 97% 99%
pidigits
source secs mem gz cpu cpu load
Haskell GHC 4.14 9,656 379 4.98 6% 72% 35% 6%
Java 3.13 37,376 938 3.35 1% 98% 4% 6%
binary-trees
source secs mem gz cpu cpu load
Haskell GHC 13.25 474,224 592 48.76 90% 93% 91% 97%
Java 8.39 960,056 835 27.39 81% 85% 74% 90%
mandelbrot
source secs mem gz cpu cpu load
Haskell GHC 11.61 38,728 782 46.32 100% 100% 100% 100%
Java 6.96 76,316 796 27.06 97% 97% 97% 97%
reverse-complement
source secs mem gz cpu cpu load
Haskell GHC 5.69 501,244 1020 7.57 59% 12% 11% 53%
Java 3.32 609,712 2183 7.54 64% 44% 44% 76%
k-nucleotide
source secs mem gz cpu cpu load
Haskell GHC 35.19 617,884 1486 122.75 87% 87% 88% 88%
Java 8.74 470,116 1812 27.12 71% 73% 93% 74%
fasta
source secs mem gz cpu cpu load
Haskell GHC 9.47 4,984 969 9.95 83% 2% 3% 18%
Java 2.32 42,212 2473 6.30 65% 85% 47% 76%
regex-redux
source secs mem gz cpu cpu load
Haskell GHC   Bad Output
Java 2.67 39,376 929 2.01 37% 21% 51% 37%
Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.6.2

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)