The Computer Language
Benchmarks Game

Haskell GHC programs versus OCaml

by benchmark task performance

n-body
source secs mem gz cpu cpu load
Haskell GHC 30.44 3,500 1874 30.42 1% 1% 0% 100%
OCaml 66.45 912 1239 66.43 0% 1% 1% 100%
binary-trees
source secs mem gz cpu cpu load
Haskell GHC 16.98 190,168 612 16.95 0% 0% 1% 100%
OCaml 34.05 139,200 496 34.00 0% 1% 1% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Haskell GHC 56.93 3,232 1153 56.90 0% 2% 1% 100%
OCaml 84.12 912 473 84.09 1% 0% 0% 100%
reverse-complement
source secs mem gz cpu cpu load
Haskell GHC 1.30 128,364 999 1.30 2% 2% 1% 99%
OCaml 1.84 265,208 2064 1.83 1% 1% 1% 100%
spectral-norm
source secs mem gz cpu cpu load
Haskell GHC 18.81 2,336 987 18.80 3% 1% 0% 100%
OCaml 18.93 4,588 907 17.98 0% 1% 1% 100%
fasta
source secs mem gz cpu cpu load
Haskell GHC 23.41 399,264 1296 23.39 0% 1% 1% 100%
OCaml 10.10 2,124 1042 10.10 1% 0% 0% 100%
k-nucleotide
source secs mem gz cpu cpu load
Haskell GHC 15.23 56,852 1052 14.96 1% 1% 1% 100%
OCaml 5.45 61,824 870 5.44 1% 1% 0% 100%
mandelbrot
source secs mem gz cpu cpu load
Haskell GHC   Bad Output
OCaml 0.37 1,156 710 0.24 0% 0% 5% 97%
pidigits
source secs mem gz cpu cpu load
Haskell GHC   Make Error
OCaml   Make Error
Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.0.1

OCaml

The OCaml native-code compiler, version 4.03.0