The Computer Language
Benchmarks Game

Haskell GHC programs versus Java

by benchmark task performance

fasta
secs KB gz cpu cpu load
Haskell GHC 2.78 4,668 1550 2.78 1% 2% 1% 100%
Java 4.81 24,836 1507 4.80 1% 1% 0% 100%
reverse-complement
secs KB gz cpu cpu load
Haskell GHC 1.29 129,332 999 1.28 2% 2% 1% 100%
Java 1.80 522,620 745 1.80 3% 1% 1% 99%
pidigits
secs KB gz cpu cpu load
Haskell GHC 3.14 7,312 341 3.14 0% 2% 1% 100%
Java 4.14 26,616 938 4.14 2% 0% 1% 100%
fannkuch-redux
secs KB gz cpu cpu load
Haskell GHC 58.15 3,500 1153 58.13 0% 1% 0% 100%
Java 67.66 26,644 1282 67.63 1% 1% 0% 100%
binary-trees
secs KB gz cpu cpu load
Haskell GHC 18.54 190,420 521 18.51 1% 0% 0% 100%
Java 16.35 526,588 584 16.33 1% 1% 0% 100%
spectral-norm
secs KB gz cpu cpu load
Haskell GHC 18.74 2,468 987 18.74 0% 100% 1% 100%
Java 16.37 26,876 950 16.36 1% 1% 0% 100%
n-body
secs KB gz cpu cpu load
Haskell GHC 32.69 3,624 1874 32.68 0% 1% 0% 100%
Java 24.33 24,036 1424 24.32 1% 0% 0% 100%
regex-dna
secs KB gz cpu cpu load
Haskell GHC 33.89 312,532 1518 33.88 1% 0% 0% 100%
Java 20.80 567,404 1284 20.79 0% 0% 1% 100%
k-nucleotide
secs KB gz cpu cpu load
Haskell GHC 63.54 388,532 1965 63.47 1% 0% 0% 100%
Java 33.48 1,190,032 1844 33.44 1% 1% 0% 100%
fasta-redux
secs KB gz cpu cpu load
  No program contribute your program
Java 0.22 476 1443 0.21 0% 5% 0% 100%
mandelbrot
secs KB gz cpu cpu load
Haskell GHC   Bad Output
Java 0.30 472 796 0.30 9% 0% 0% 100%
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)