/mobile Handheld Friendly website

÷

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

This chart shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.

Each chart bar shows, for one unidentified benchmark, how much the fastest OCaml program used compared to the fastest C++ GNU g++ program.


Look at speed another way - look at a box plot of Time-used data.

 Step 2 : Are the OCaml programs faster? Approximately.

This table shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.

Each table row shows, for one named benchmark, how much the fastest OCaml program used compared to the fastest C++ GNU g++ program.

 OCaml used what fraction? used how many times more? 
Benchmark Time Memory Code
 fannkuch-redux±1/21/3
 reverse-complement1/2±
 spectral-norm1/3
 fasta±
 regex-dna±
 binary-trees±±
 n-body±
 mandelbrot1/9±
 k-nucleotide11×1/2
 pidigits±
 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.

 Step 3 : Are the OCaml programs faster? Measurements.

This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ≈ CPU Load ~ speed and size.

For each named benchmark, measurements of the fastest OCaml program are shown for comparison against measurements of the fastest C++ GNU g++ program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 fannkuch-redux 
OCaml74.3474.36552473  0% 0% 0% 100%
C++ GNU g++61.4261.441,0201439  0% 0% 0% 100%
 reverse-complement 
OCaml1.681.68127,2602064  2% 0% 0% 100%
C++ GNU g++1.071.09245,4242275  0% 0% 1% 100%
 spectral-norm 
OCaml18.8518.861,596377  0% 0% 0% 100%
C++ GNU g++10.0010.006481044  0% 1% 0% 100%
 fasta 
OCaml12.4412.451,6041042  0% 0% 0% 100%
C++ GNU g++6.306.302881266  0% 0% 0% 100%
 regex-dna 
OCaml1.651.6552,740615  1% 1% 1% 100%
C++ GNU g++0.590.6812,908695  1% 1% 3% 100%
 binary-trees 
OCaml35.0635.13100,968784  0% 0% 0% 100%
C++ GNU g++13.0313.05148,440892  0% 1% 0% 100%
 n-body 
OCaml59.9159.935481239  0% 0% 0% 100%
C++ GNU g++20.1520.163201659  0% 0% 0% 100%
 mandelbrot 
OCaml85.6785.833,712710  0% 0% 0% 100%
C++ GNU g++23.7223.7332,0961017  0% 0% 0% 100%
 k-nucleotide 
OCaml5.986.00227,2601789  0% 1% 1% 100%
C++ GNU g++1.281.2920,4603415  0% 4% 1% 100%
 pidigits 
OCaml17.0117.024,432869  0% 0% 0% 100%
C++ GNU g++2.752.761,448682  0% 1% 1% 100%
 fasta-redux 
No program
C++ GNU g++0.030.04?1474  20% 0% 0% 100%

 Step 4 : Are there other OCaml programs for these benchmarks?

Remember - those are just the fastest OCaml and C++ GNU g++ 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.

 Step 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest OCaml and C++ GNU g++ 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 Objective Caml native-code compiler, version 3.12.1

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

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

Revised BSD license

  Home   Conclusions   License   Help