/mobile Handheld Friendly website

÷

 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.


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.

 OCaml used what fraction? used how many times more? 
Benchmark Time Memory Code
 regex-dna1/2±1/2
 k-nucleotide±±1/3
 reverse-complement±±
 fannkuch-redux±1/31/2
 spectral-norm±1/3
 pidigits±±
 mandelbrot1/9±
 n-body1/31/2
 binary-trees1/2±
 fasta±±
 OCaml used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/21/2±±

± 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 
OCaml1.651.6557,792615  2% 1% 0% 100%
Haskell GHC2.892.9839,7361518  0% 0% 1% 100%
 k-nucleotide 
OCaml5.785.7953,052870  0% 0% 1% 100%
Haskell GHC7.957.9665,3002749  0% 0% 1% 100%
 reverse-complement 
OCaml1.651.66127,5682064  0% 1% 1% 100%
Haskell GHC1.541.55125,748999  0% 1% 0% 100%
 fannkuch-redux 
OCaml73.4673.47580473  0% 0% 0% 100%
Haskell GHC63.9263.941,5881153  0% 0% 0% 100%
 spectral-norm 
OCaml18.8518.851,644377  0% 0% 0% 100%
Haskell GHC15.7215.721,056984  0% 0% 0% 100%
 pidigits 
OCaml3.803.815,704560  1% 1% 0% 100%
Haskell GHC3.063.075,284341  0% 1% 1% 100%
 mandelbrot 
OCaml85.7185.863,984710  0% 0% 0% 100%
Haskell GHC43.9643.9835,364782  0% 0% 0% 100%
 n-body 
OCaml47.6547.675801239  0% 0% 0% 100%
Haskell GHC23.6823.691,8401874  0% 0% 0% 100%
 binary-trees 
OCaml35.7335.77115,688496  0% 0% 0% 100%
Haskell GHC16.4916.51183,532612  0% 0% 1% 100%
 fasta 
OCaml11.7511.751,6361042  0% 0% 1% 100%
Haskell GHC3.363.362,364979  0% 0% 0% 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.00.1

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

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

Revised BSD license

  Home   Conclusions   License   Play