The Computer Language
Benchmarks Game

Haskell GHC programs versus OCaml

by benchmark task performance

mandelbrot
source secs mem gz cpu cpu load
Haskell GHC 11.69 38,472 782 46.64 100% 100% 100% 100%
OCaml 55.18 2,900 444 55.17 0% 1% 0% 100%
spectral-norm
source secs mem gz cpu cpu load
Haskell GHC 4.04 4,132 987 15.71 97% 100% 95% 97%
OCaml 4.31 5,280 914 15.97 92% 94% 93% 92%
fannkuch-redux
source secs mem gz cpu cpu load
Haskell GHC 15.40 3,368 1113 60.35 100% 99% 99% 95%
OCaml 16.12 ? 1017 ? 100% 100% 100% 100%
n-body
source secs mem gz cpu cpu load
Haskell GHC 21.43 3,996 1883 84.71 98% 100% 99% 98%
OCaml 21.67 1,588 1251 21.67 61% 1% 0% 39%
binary-trees
source secs mem gz cpu cpu load
Haskell GHC 24.81 512,320 538 51.11 35% 39% 98% 36%
OCaml 10.03 115,968 751 30.17 89% 89% 82% 44%
reverse-complement
source secs mem gz cpu cpu load
Haskell GHC 0.03 ? 1020 0.03 0% 0% 100% 0%
OCaml   Make Error
fasta
source secs mem gz cpu cpu load
Haskell GHC 0.13 ? 969 0.14 0% 15% 15% 92%
OCaml   Make Error
regex-redux
source secs mem gz cpu cpu load
Haskell GHC   Bad Output
OCaml   Make Error
pidigits
source secs mem gz cpu cpu load
Haskell GHC   Make Error
OCaml   Make Error
k-nucleotide
source secs mem gz cpu cpu load
Haskell GHC 0.50 15,184 1486 1.59 82% 80% 84% 90%
OCaml   Make Error
Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.2.1

OCaml

The OCaml native-code compiler, version 4.06.0