The Computer Language
Benchmarks Game

OCaml programs versus Haskell GHC

by benchmark task performance

binary-trees
source secs mem gz cpu cpu load
OCaml 9.95 115,760 746 29.67 99% 73% 41% 87%
Haskell GHC 26.28 511,444 494 52.69 35% 41% 93% 34%
fasta
source secs mem gz cpu cpu load
OCaml 5.88 200,032 1161 5.88 3% 100% 1% 1%
Haskell GHC 14.68 455,088 1296 51.59 89% 87% 88% 91%
reverse-complement
source secs mem gz cpu cpu load
OCaml 0.76 ? 1314 ? 46% 58% 57% 49%
Haskell GHC 1.39 132,176 999 1.52 4% 4% 100% 4%
n-body
source secs mem gz cpu cpu load
OCaml 21.68 1,252 1239 21.67 0% 0% 100% 1%
Haskell GHC 24.48 6,468 1874 25.62 85% 2% 2% 17%
fannkuch-redux
source secs mem gz cpu cpu load
OCaml 16.52 ? 1004 ? 100% 100% 100% 100%
Haskell GHC 16.70 7,628 1153 65.63 100% 95% 100% 99%
spectral-norm
source secs mem gz cpu cpu load
OCaml 4.35 5,008 907 15.54 90% 93% 93% 93%
Haskell GHC 4.06 9,880 987 15.71 97% 97% 98% 97%
mandelbrot
source secs mem gz cpu cpu load
OCaml 13.76 8,240 710 54.76 100% 100% 100% 100%
Haskell GHC 11.64 41,180 782 46.40 100% 100% 100% 100%
pidigits
source secs mem gz cpu cpu load
OCaml   Make Error
Haskell GHC   Make Error
regex-redux
source secs mem gz cpu cpu load
OCaml 0.20 ? 622 0.20 0% 0% 100% 0%
Haskell GHC   Make Error
k-nucleotide
source secs mem gz cpu cpu load
OCaml 0.28 34,308 1789 0.72 57% 44% 100% 67%
Haskell GHC   Make Error
OCaml

The OCaml native-code compiler, version 4.04.0

Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.0.2