The Computer Language
Benchmarks Game

OCaml programs versus Haskell GHC

by benchmark task performance

fasta
source secs mem gz cpu cpu load
OCaml 5.79 202,460 1161 5.79 1% 2% 100% 1%
Haskell GHC 15.50 450,024 1296 48.32 76% 76% 87% 77%
k-nucleotide
source secs mem gz cpu cpu load
OCaml 19.76 256,940 1789 54.18 43% 96% 43% 94%
Haskell GHC 41.92 602,836 1463 146.09 87% 95% 91% 89%
reverse-complement
source secs mem gz cpu cpu load
OCaml 0.74 ? 1314 ? 63% 61% 42% 57%
Haskell GHC 1.43 131,184 999 1.59 6% 6% 99% 2%
n-body
source secs mem gz cpu cpu load
OCaml 21.69 1,084 1239 21.68 1% 1% 100% 1%
Haskell GHC 24.48 7,856 1874 25.55 2% 100% 1% 2%
fannkuch-redux
source secs mem gz cpu cpu load
OCaml 16.14 ? 1017 ? 100% 100% 100% 100%
Haskell GHC 17.00 6,948 1153 66.65 95% 100% 98% 99%
spectral-norm
source secs mem gz cpu cpu load
OCaml 4.46 4,792 907 15.50 90% 93% 88% 90%
Haskell GHC 4.06 9,848 987 15.70 97% 97% 99% 95%
binary-trees
source secs mem gz cpu cpu load
OCaml 23.42 173,568 784 70.56 84% 90% 77% 55%
Haskell GHC 20.83 817,104 612 65.44 72% 92% 80% 72%
mandelbrot
source secs mem gz cpu cpu load
OCaml 13.78 7,800 710 54.76 100% 100% 100% 99%
Haskell GHC 11.63 44,252 782 46.34 100% 100% 100% 100%
regex-redux
source secs mem gz cpu cpu load
OCaml   Bad Output
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.04.0

Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.0.1