/mobile Handheld Friendly website

vs

 1 : Are the OCaml programs faster? At a glance.

Each chart bar shows, for one unidentified benchmark, how much the fastest OCaml program used compared to the fastest Haskell GHC program.

(Memory use is only compared for tasks that require memory to be allocated.)


These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. These are just 10 tiny examples.

 2 : Are the OCaml programs faster? Approximately.

Each table row shows, for one named benchmark, how much the fastest OCaml program used compared to the fastest Haskell GHC program.

(Memory use is only compared for tasks that require memory to be allocated.)

 OCaml used what fraction? used how many times more? 
Benchmark Time Memory Code
 regex-dna±1/2
 n-body± 1/2
 fannkuch-redux± ±
 spectral-norm± 1/3
 k-nucleotide±±±
 mandelbrot± ±
 pidigits± 
 reverse-complement±1/4±
 binary-trees±±
 fasta ±
 OCaml used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±±±±

± read the measurements and then read the program source code.

 3 : Are the OCaml programs faster? Measurements.

These are not the only tasks that could be solved. These are just 10 tiny examples. These are not the only compilers and interpreters. These are not the only programs that could be written.

For each named benchmark, measurements of the fastest OCaml program are shown for comparison against measurements of the fastest Haskell GHC program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 regex-dna 
OCaml19.0319.06511,660615  0% 0% 0% 100%
Haskell GHC26.5326.54335,6441518  0% 1% 1% 100%
 n-body 
OCaml21.8621.877201239  0% 1% 0% 100%
Haskell GHC22.6522.662,3441874  0% 1% 1% 100%
 fannkuch-redux 
OCaml0.0065.0211,4161004  0% 0% 0% 100%
Haskell GHC65.5465.562,364834  0% 1% 1% 100%
 spectral-norm 
OCaml15.6815.691,808377  0% 0% 0% 100%
Haskell GHC15.6915.701,588984  1% 0% 0% 100%
 k-nucleotide 
OCaml56.2256.29253,6281789  0% 0% 0% 100%
Haskell GHC47.7547.80362,4601693  0% 1% 1% 100%
 mandelbrot 
OCaml55.7755.926,548710  0% 0% 0% 100%
Haskell GHC45.5345.5538,532782  1% 0% 0% 100%
 pidigits 
OCaml2.802.819,036560  0% 1% 1% 100%
Haskell GHC2.242.245,964341  1% 0% 1% 100%
 reverse-complement 
OCaml0.001.5431,3161314  1% 1% 2% 100%
Haskell GHC1.191.19126,148999  0% 1% 0% 99%
 binary-trees 
OCaml43.8043.87232,168496  0% 0% 0% 100%
Haskell GHC21.6321.66312,868612  0% 0% 1% 100%
 fasta 
OCaml10.5210.53201,7801161  0% 0% 0% 100%
Haskell GHC3.603.602,736979  2% 0% 1% 100%
 fasta-redux
   No programs

 4 : Are there other OCaml programs for these benchmarks?

Remember - those are just the fastest OCaml and Haskell GHC programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for OCaml.

Maybe one of those other OCaml programs is fastest on a different OS/machine.

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest OCaml and Haskell GHC programs measured on this OS/machine. Check if there are faster implementations of these benchmark programs for other programming languages.

Maybe one of those other programs is fastest on a different OS/machine.

 OCaml : modular type-safe strict functional programming plus objects 

The OCaml native-code compiler, version 4.01.0

Home Page: http://www.ocaml.org/

Download: http://caml.inria.fr/download.en.html

Revised BSD license

  Home   Conclusions   License   Play