The Computer Language
Benchmarks Game

Haskell GHC programs versus Java

by benchmark task performance

pidigits
source secs KB gz cpu cpu load
Haskell GHC 2.82 11,800 341 4.14 18% 15% 15% 100%
Java 3.11 33,364 938 3.20 99% 2% 2% 2%
spectral-norm
source secs KB gz cpu cpu load
Haskell GHC 4.06 9,848 987 15.70 97% 97% 99% 95%
Java 4.26 32,244 950 16.41 96% 98% 95% 97%
n-body
source secs KB gz cpu cpu load
Haskell GHC 24.48 7,856 1874 25.55 2% 100% 1% 2%
Java 22.53 28,212 1430 22.54 100% 7% 1% 1%
reverse-complement
source secs KB gz cpu cpu load
Haskell GHC 1.43 131,184 999 1.59 6% 6% 99% 2%
Java 1.17 345,940 1661 2.42 41% 43% 57% 72%
fannkuch-redux
source secs KB gz cpu cpu load
Haskell GHC 17.00 6,948 1153 66.65 95% 100% 98% 99%
Java 13.65 31,996 1282 53.64 99% 98% 99% 98%
regex-dna
source secs KB gz cpu cpu load
Haskell GHC 10.84 264,404 1518 41.01 94% 96% 97% 92%
Java 8.23 753,008 929 24.56 71% 78% 81% 70%
fasta
source secs KB gz cpu cpu load
Haskell GHC 3.02 14,276 1567 6.80 53% 70% 53% 54%
Java 2.20 37,072 2457 6.37 81% 68% 72% 72%
mandelbrot
source secs KB gz cpu cpu load
Haskell GHC 11.63 44,252 782 46.34 100% 100% 100% 100%
Java 7.14 88,236 796 27.93 97% 98% 98% 99%
binary-trees
source secs KB gz cpu cpu load
Haskell GHC 20.83 817,104 612 65.44 72% 92% 80% 72%
Java 11.51 622,328 889 40.10 86% 86% 92% 87%
k-nucleotide
source secs KB gz cpu cpu load
  No program contribute your program
Java 0.54 44,404 1602 1.55 71% 80% 75% 67%
fasta-redux
source secs KB gz cpu cpu load
  No program contribute your program
Java 0.17 ? 1443 0.19 17% 12% 78% 0%
Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.0.1

Java

java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)