The Computer Language
Benchmarks Game

OCaml programs versus Haskell GHC

by benchmark task performance

k-nucleotide
source secs KB gz cpu cpu load
OCaml 5.45 61,824 870 5.44 1% 1% 0% 100%
Haskell GHC 15.23 56,852 1052 14.96 1% 1% 1% 100%
fasta
source secs KB gz cpu cpu load
OCaml 10.10 2,124 1042 10.10 1% 0% 0% 100%
Haskell GHC 23.41 399,264 1296 23.39 0% 1% 1% 100%
regex-dna
source secs KB gz cpu cpu load
OCaml 1.73 46,712 615 1.73 2% 1% 1% 100%
Haskell GHC 3.65 35,812 1518 3.56 1% 1% 1% 100%
spectral-norm
source secs KB gz cpu cpu load
OCaml 18.93 4,588 907 17.98 0% 1% 1% 100%
Haskell GHC 18.81 2,336 987 18.80 3% 1% 0% 100%
reverse-complement
source secs KB gz cpu cpu load
OCaml 1.84 265,208 2064 1.83 1% 1% 1% 100%
Haskell GHC 1.30 128,364 999 1.30 2% 2% 1% 99%
fannkuch-redux
source secs KB gz cpu cpu load
OCaml 84.12 912 473 84.09 1% 0% 0% 100%
Haskell GHC 56.93 3,232 1153 56.90 0% 2% 1% 100%
binary-trees
source secs KB gz cpu cpu load
OCaml 34.05 139,200 496 34.00 0% 1% 1% 100%
Haskell GHC 16.98 190,168 612 16.95 0% 0% 1% 100%
n-body
source secs KB gz cpu cpu load
OCaml 66.45 912 1239 66.43 0% 1% 1% 100%
Haskell GHC 30.44 3,500 1874 30.42 1% 1% 0% 100%
pidigits
source secs KB gz cpu cpu load
OCaml   Make Error
Haskell GHC   Make Error
mandelbrot
source secs KB gz cpu cpu load
OCaml 0.37 1,156 710 0.24 0% 0% 5% 97%
Haskell GHC   Bad Output
OCaml

The OCaml native-code compiler, version 4.03.0

Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.0.1