/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-dna1/2±
 k-nucleotide±±
 fannkuch-redux± 1/2
 spectral-norm± 1/3
 pidigits± 
 reverse-complement±±
 mandelbrot 1/2
 binary-trees1/2±
 n-body 1/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.641.66283,0721014  1% 0% 1% 100%
Haskell GHC2.852.9338,2761518  0% 1% 1% 100%
 k-nucleotide 
OCaml5.865.88228,1041789  0% 0% 1% 100%
Haskell GHC7.187.1954,1561965  0% 1% 1% 100%
 fannkuch-redux 
OCaml71.1071.12596473  0% 0% 0% 100%
Haskell GHC62.2462.261,9881153  0% 0% 1% 100%
 spectral-norm 
OCaml18.8518.861,660377  0% 0% 0% 100%
Haskell GHC15.7015.701,184984  0% 1% 0% 100%
 pidigits 
OCaml3.803.815,700560  1% 0% 1% 100%
Haskell GHC2.962.965,676341  0% 1% 0% 100%
 reverse-complement 
OCaml1.661.66127,5842064  0% 1% 1% 100%
Haskell GHC1.221.22125,892999  0% 2% 2% 100%
 mandelbrot 
OCaml85.9385.961,648444  0% 0% 0% 100%
Haskell GHC47.7947.8134,980782  0% 1% 0% 100%
 binary-trees 
OCaml35.0035.07101,028784  0% 0% 0% 100%
Haskell GHC18.2318.25173,344612  0% 1% 1% 100%
 n-body 
OCaml49.9149.935961239  0% 0% 0% 100%
Haskell GHC24.2024.222,2401874  1% 0% 1% 100%
 fasta 
OCaml12.1612.171,6561042  0% 0% 0% 100%
Haskell GHC3.353.352,504979  1% 1% 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.01.0

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

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

Revised BSD license

  Home   Conclusions   License   Play