The Computer Language
Benchmarks Game

Haskell GHC programs versus Java

by benchmark task performance

fasta
source secs KB gz cpu cpu load
Haskell GHC 2.93 3,812 979 2.93 1% 1% 0% 100%
Java 4.77 23,400 1507 4.76 1% 1% 1% 100%
reverse-complement
source secs KB gz cpu cpu load
Haskell GHC 1.30 128,364 999 1.30 2% 2% 1% 99%
Java 1.79 521,988 745 1.78 1% 2% 2% 100%
pidigits
source secs KB gz cpu cpu load
Haskell GHC 3.14 7,272 341 3.13 1% 1% 0% 100%
Java 4.14 25,988 938 4.13 1% 1% 0% 100%
fannkuch-redux
source secs KB gz cpu cpu load
Haskell GHC 56.93 3,232 1153 56.90 0% 2% 1% 100%
Java 67.56 23,480 1282 67.53 1% 1% 1% 100%
binary-trees
source secs KB gz cpu cpu load
Haskell GHC 16.98 190,168 612 16.95 0% 0% 1% 100%
Java 16.53 511,692 584 16.51 1% 1% 0% 100%
spectral-norm
source secs KB gz cpu cpu load
Haskell GHC 18.81 2,336 987 18.80 3% 1% 0% 100%
Java 16.30 23,872 950 16.29 1% 0% 1% 100%
n-body
source secs KB gz cpu cpu load
Haskell GHC 30.44 3,500 1874 30.42 1% 1% 0% 100%
Java 24.07 23,184 1430 24.06 1% 1% 1% 100%
regex-dna
source secs KB gz cpu cpu load
Haskell GHC 35.36 313,524 1518 35.34 1% 1% 1% 100%
Java 11.41 699,176 1085 11.39 1% 1% 0% 100%
k-nucleotide
source secs KB gz cpu cpu load
  No program contribute your program
Java 1.25 50,228 1802 1.14 3% 1% 2% 100%
fasta-redux
source secs KB gz cpu cpu load
  No program contribute your program
Java 0.19 ? 1443 0.18 0% 0% 0% 100%
mandelbrot
source secs KB gz cpu cpu load
Haskell GHC   Bad Output
Java 0.27 492 796 0.27 4% 0% 0% 100%
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) Server VM (build 25.92-b14, mixed mode)