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%
fasta
source secs mem gz cpu cpu load
Haskell GHC 9.36 5,044 969 9.74 2% 3% 2% 99%
OCaml 6.00 199,732 1189 5.99 0% 2% 100% 0%
k-nucleotide
source secs mem gz cpu cpu load
Haskell GHC 35.01 644,356 1486 122.09 86% 87% 89% 97%
OCaml 21.63 255,436 1833 57.55 47% 39% 94% 89%
reverse-complement
source secs mem gz cpu cpu load
Haskell GHC 1.40 128,808 1020 1.46 2% 5% 2% 99%
OCaml 0.79 ? 1368 ? 48% 59% 74% 58%
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%
regex-redux
source secs mem gz cpu cpu load
Haskell GHC   Bad Output
OCaml 0.23 1,876 637 0.20 92% 0% 12% 5%
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.2.1

OCaml

The OCaml native-code compiler, version 4.06.0