/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
 fannkuch-redux †1/4
 reverse-complement1/21/4±
 regex-dna±±±
 n-body±1/31/2
 spectral-norm±±
 k-nucleotide±±±
 mandelbrot±1/6±
 binary-trees±1/4±
 fasta75×±
 pidigits †1/2
 OCaml used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/41/3±±±

† possible mismatch - one-core program compared to multi-core program.

± 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
 fannkuch-redux 
OCaml0.0016.3611,5521004  100% 100% 100% 100% †
Haskell GHC75.4868.672,336658  15% 42% 43% 10% †
 reverse-complement 
OCaml0.000.8131,0521314  49% 42% 48% 75%
Haskell GHC1.781.49126,196999  80% 28% 6% 9%
 regex-dna 
OCaml1.459.20264,7041050  84% 85% 86% 99%
Haskell GHC36.539.58248,7721518  95% 97% 95% 96%
 n-body 
OCaml23.8223.837161239  0% 0% 0% 100%
Haskell GHC24.8623.442,3761874  64% 6% 17% 20%
 spectral-norm 
OCaml16.584.393,504938  99% 98% 99% 99%
Haskell GHC15.704.041,584984  97% 98% 95% 100%
 k-nucleotide 
OCaml56.8221.99258,4801789  55% 39% 100% 65%
Haskell GHC68.5018.58374,4881693  91% 93% 93% 93%
 mandelbrot 
OCaml55.5713.986,316710  99% 100% 100% 100%
Haskell GHC43.6610.9536,536782  100% 100% 100% 100%
 binary-trees 
OCaml67.3327.17201,692784  40% 84% 55% 71%
Haskell GHC65.0020.04787,716612  90% 85% 75% 75%
 fasta 
OCaml10.5010.52198,0601161  0% 0% 0% 100%
Haskell GHC4.684.032,632979  5% 86% 19% 5%
 pidigits 
OCaml9.319.322,8321481  0% 0% 100% 0% †
Haskell GHC4.182.776,076341  18% 100% 17% 14% †
 fasta-redux
   No programs

† possible mismatch - one-core program compared to multi-core program.

 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