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.82 115,804 746 28.90 90% 96% 39% 72%
Haskell GHC 25.26 673,076 494 52.88 43% 93% 38% 38%
fasta
source secs mem gz cpu cpu load
OCaml 5.89 201,740 1161 5.88 100% 1% 0% 2%
Haskell GHC 13.70 473,972 1296 45.44 98% 80% 79% 78%
reverse-complement
source secs mem gz cpu cpu load
OCaml 0.75 ? 1314 ? 46% 53% 61% 52%
Haskell GHC 1.29 133,992 999 1.36 5% 100% 4% 5%
k-nucleotide
source secs mem gz cpu cpu load
OCaml 19.69 259,992 1789 54.82 71% 90% 50% 70%
Haskell GHC 32.33 643,572 1463 124.08 97% 95% 95% 98%
n-body
source secs mem gz cpu cpu load
OCaml 21.67 1,276 1239 21.66 1% 100% 0% 1%
Haskell GHC 21.45 9,988 1874 84.61 99% 99% 98% 100%
fannkuch-redux
source secs mem gz cpu cpu load
OCaml 16.23 ? 1017 ? 100% 100% 100% 100%
Haskell GHC 15.50 7,972 1110 60.67 96% 100% 98% 99%
spectral-norm
source secs mem gz cpu cpu load
OCaml 4.36 5,072 907 15.48 92% 91% 93% 91%
Haskell GHC 4.05 7,800 987 15.70 100% 94% 97% 97%
mandelbrot
source secs mem gz cpu cpu load
OCaml 13.78 8,300 710 54.76 100% 100% 100% 100%
Haskell GHC 11.95 42,008 782 47.64 100% 100% 100% 100%
regex-redux
source secs mem gz cpu cpu load
OCaml 0.21 1,424 622 0.20 100% 5% 5% 5%
Haskell GHC   Bad Output
pidigits
source secs mem gz cpu cpu load
OCaml   Make Error
Haskell GHC   Make Error
OCaml

The OCaml native-code compiler, version 4.05.0

Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.2.1