The Computer Language
Benchmarks Game

Haskell GHC programs versus Java

by benchmark task performance

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%
fannkuch-redux
source secs KB gz cpu cpu load
Haskell GHC 56.93 3,232 1153 56.90 0% 2% 1% 100%
Java 67.02 23,380 1257 67.00 0% 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
Haskell GHC 139.13 492,368 1052 136.78 0% 1% 1% 100%
Java 36.57 512,948 1802 36.54 1% 0% 0% 100%
fasta
source secs KB gz cpu cpu load
Haskell GHC 23.41 399,264 1296 23.39 0% 1% 1% 100%
Java 4.77 23,400 1507 4.76 1% 1% 1% 100%
mandelbrot
source secs KB gz cpu cpu load
Haskell GHC   Bad Output
Java 0.27 492 796 0.27 4% 0% 0% 100%
pidigits
source secs KB gz cpu cpu load
Haskell GHC   Make Error
Java 0.34 492 938 0.32 3% 3% 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)