The Computer Language
Benchmarks Game

Haskell GHC versus OCaml fastest programs

by faster benchmark performance

pidigits
source secs mem gz cpu cpu load
Haskell GHC 4.22 9,728 379 5.17 45% 11% 10% 64%
OCaml 6.72 19,888 458 6.71 1% 1% 100% 0%
mandelbrot
source secs mem gz cpu cpu load
Haskell GHC 11.61 38,728 782 46.32 100% 100% 100% 100%
OCaml 13.76 4,836 717 54.86 100% 100% 100% 100%
spectral-norm
source secs mem gz cpu cpu load
Haskell GHC 4.06 3,620 987 15.71 97% 99% 97% 95%
OCaml 4.29 5,384 914 15.99 93% 94% 94% 93%
n-body
source secs mem gz cpu cpu load
Haskell GHC 21.99 3,984 1883 86.80 99% 98% 100% 99%
OCaml 21.68 1,520 1251 21.68 1% 0% 100% 0%
fannkuch-redux
source secs mem gz cpu cpu load
Haskell GHC 18.17 4,024 842 71.56 96% 99% 100% 99%
OCaml 16.24 ? 1017 ? 100% 100% 100% 100%
binary-trees
source secs mem gz cpu cpu load
Haskell GHC 13.25 474,224 592 48.76 90% 93% 91% 97%
OCaml 9.65 116,140 751 28.69 89% 43% 98% 69%
reverse-complement
source secs mem gz cpu cpu load
Haskell GHC 5.69 501,244 1020 7.57 59% 12% 11% 53%
OCaml 3.79 ? 1368 ? 54% 56% 65% 54%
fasta
source secs mem gz cpu cpu load
Haskell GHC 9.47 4,984 969 9.95 83% 2% 3% 18%
OCaml 6.03 198,704 1189 6.02 1% 0% 1% 100%
k-nucleotide
source secs mem gz cpu cpu load
Haskell GHC 35.19 617,884 1486 122.75 87% 87% 88% 88%
OCaml 22.04 255,528 1833 57.20 41% 70% 57% 93%
regex-redux
source secs mem gz cpu cpu load
Haskell GHC   Bad Output
OCaml 0.44 ? 637 ? 2% 75% 23% 2%
Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.6.2

OCaml

The OCaml native-code compiler, version 4.07.0