The Computer Language
Benchmarks Game

Haskell GHC programs versus Java

by benchmark task performance

pidigits
source secs KB gz cpu cpu load
Haskell GHC 3.70 13,832 341 5.19 91% 21% 14% 14%
Java 4.07 26,324 938 4.17 3% 3% 4% 96%
reverse-complement
source secs KB gz cpu cpu load
Haskell GHC 1.41 128,652 999 1.50 3% 4% 3% 99%
Java 1.44 308,060 1661 2.91 47% 31% 85% 43%
regex-dna
source secs KB gz cpu cpu load
Haskell GHC 10.39 243,972 1518 39.42 97% 94% 93% 96%
Java 8.80 729,244 929 25.79 77% 80% 72% 66%
fasta
source secs KB gz cpu cpu load
Haskell GHC 2.18 12,844 1567 6.13 63% 64% 64% 93%
Java 1.82 31,600 2457 5.90 80% 83% 80% 82%
n-body
source secs KB gz cpu cpu load
Haskell GHC 32.71 12,292 1874 33.45 1% 1% 100% 1%
Java 24.31 24,156 1424 24.34 1% 1% 1% 100%
k-nucleotide
source secs KB gz cpu cpu load
Haskell GHC 19.79 506,156 1965 73.04 91% 91% 92% 97%
Java 10.61 1,199,184 1844 35.27 79% 78% 90% 88%
binary-trees
source secs KB gz cpu cpu load
Haskell GHC 12.74 413,228 612 38.17 94% 73% 67% 67%
Java 5.88 513,180 926 19.64 95% 79% 87% 76%
fannkuch-redux
source secs KB gz cpu cpu load
Haskell GHC 81.40 6,316 1153 188.02 69% 45% 100% 19%
Java 17.13 25,804 1282 67.56 100% 98% 99% 98%
spectral-norm
source secs KB gz cpu cpu load
Haskell GHC 25.92 13,552 403 63.92 85% 61% 51% 51%
Java 4.30 26,476 950 16.53 99% 96% 95% 96%
fasta-redux
source secs KB gz cpu cpu load
  No program contribute your program
Java 0.20 ? 1443 0.22 0% 10% 90% 11%
mandelbrot
source secs KB gz cpu cpu load
Haskell GHC   Bad Output
Java 0.23 480 796 0.42 32% 30% 96% 30%
Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 7.10.2

Java

java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) Server VM (build 25.45-b02, mixed mode)