The Computer Language
Benchmarks Game

Haskell GHC programs versus Java

by benchmark task performance

fasta
source secs KB gz cpu cpu load
Haskell GHC 3.46 5,344 1550 3.45 1% 0% 2% 100%
Java 5.15 31,376 1507 5.14 1% 1% 0% 100%
reverse-complement
source secs KB gz cpu cpu load
Haskell GHC 1.24 128,880 999 1.23 2% 0% 3% 100%
Java 1.70 474,400 745 1.70 1% 1% 3% 99%
pidigits
source secs KB gz cpu cpu load
Haskell GHC 2.33 7,940 341 2.33 1% 1% 0% 100%
Java 3.20 33,052 938 3.20 1% 1% 1% 100%
n-body
source secs KB gz cpu cpu load
Haskell GHC 23.44 4,232 1874 23.43 1% 0% 0% 100%
Java 22.68 30,056 1424 22.67 0% 0% 1% 100%
k-nucleotide
source secs KB gz cpu cpu load
Haskell GHC 46.67 497,248 1693 46.61 0% 1% 0% 100%
Java 34.83 1,124,104 1844 34.79 1% 1% 0% 100%
regex-dna
source secs KB gz cpu cpu load
Haskell GHC 34.02 321,120 1518 34.00 0% 0% 1% 100%
Java 21.40 575,372 1284 21.39 1% 0% 1% 100%
mandelbrot
source secs KB gz cpu cpu load
Haskell GHC 47.17 40,024 782 47.15 1% 0% 0% 100%
Java 23.93 91,684 796 23.92 1% 1% 1% 100%
spectral-norm
source secs KB gz cpu cpu load
Haskell GHC 37.62 5,784 403 37.60 1% 0% 0% 100%
Java 16.22 32,332 950 16.22 0% 1% 1% 100%
binary-trees
source secs KB gz cpu cpu load
Haskell GHC 20.93 306,436 612 20.89 0% 1% 1% 100%
Java 7.39 414,024 583 7.38 1% 1% 1% 100%
fannkuch-redux
source secs KB gz cpu cpu load
Haskell GHC 244.58 5,820 808 244.48 1% 0% 1% 100%
Java 69.27 47,784 1282 69.25 1% 0% 0% 100%
fasta-redux
source secs KB gz cpu cpu load
  No program contribute your program
Java 0.22 1,704 1443 0.20 5% 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) 64-Bit Server VM (build 25.45-b02, mixed mode)