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

The Glorious Glasgow Haskell Compilation System, version 8.0.2

OCaml

The OCaml native-code compiler, version 4.04.0