The Computer Language
Benchmarks Game

Haskell GHC programs versus Java

by benchmark task performance

pidigits
secs KB gz cpu cpu load
Haskell GHC 2.83 16,352 341 4.13 41% 15% 17% 76%
Java 3.12 33,528 938 3.22 3% 2% 80% 21%
spectral-norm
secs KB gz cpu cpu load
Haskell GHC 4.05 11,916 987 15.70 95% 97% 99% 98%
Java 4.28 32,696 950 16.53 96% 96% 96% 99%
n-body
secs KB gz cpu cpu load
Haskell GHC 23.91 8,428 1874 25.12 2% 35% 67% 2%
Java 22.66 30,036 1424 22.68 97% 3% 0% 1%
reverse-complement
secs KB gz cpu cpu load
Haskell GHC 1.42 129,168 999 1.58 100% 8% 8% 6%
Java 1.27 315,296 1661 2.68 41% 48% 34% 92%
regex-dna
secs KB gz cpu cpu load
Haskell GHC 10.84 257,400 1518 40.78 96% 91% 93% 98%
Java 8.24 761,724 929 24.70 68% 73% 77% 83%
fasta
secs KB gz cpu cpu load
Haskell GHC 2.99 15,308 1567 6.84 53% 54% 54% 71%
Java 2.19 39,368 2457 5.60 58% 72% 66% 61%
binary-trees
secs KB gz cpu cpu load
Haskell GHC 19.98 800,820 612 63.76 74% 87% 87% 74%
Java 13.33 519,948 603 18.61 38% 24% 17% 62%
k-nucleotide
secs KB gz cpu cpu load
Haskell GHC 17.70 537,948 1693 65.71 97% 92% 92% 91%
Java 11.29 1,118,288 1844 38.66 83% 97% 82% 82%
mandelbrot
secs KB gz cpu cpu load
Haskell GHC 11.87 44,232 782 47.32 100% 100% 100% 100%
Java 6.27 88,992 796 24.24 96% 97% 97% 98%
fannkuch-redux
secs KB gz cpu cpu load
Haskell GHC 75.11 10,556 665 80.89 4% 39% 59% 8%
Java 17.41 33,032 1282 68.64 98% 98% 99% 99%
fasta-redux
secs KB gz cpu cpu load
  No program contribute your program
Java 0.19 ? 1443 0.22 95% 10% 10% 10%
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) 64-Bit Server VM (build 25.45-b02, mixed mode)