/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
 regex-dna±56×
 reverse-complement±1/201/2
 fannkuch-redux17×±
 spectral-norm±
 fasta±
 binary-trees1/2±
 n-body±
 mandelbrot1/9±
 pidigits±
 k-nucleotide14×1/2
 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
 regex-dna 
OCaml0.100.54414,0281050  81% 80% 98% 81%
C++ GNU g++0.620.557,396695  39% 22% 2% 69%
 reverse-complement 
OCaml0.000.9412,4681314  51% 56% 60% 80%
C++ GNU g++1.250.86245,4562275  51% 15% 33% 49%
 fannkuch-redux 
OCaml0.0026.1117,4561017  100% 100% 100% 100%
C++ GNU g++61.4215.771,0201439  100% 97% 97% 96%
 spectral-norm 
OCaml17.974.783,036938  99% 99% 99% 99%
C++ GNU g++10.032.523881044  100% 100% 100% 100%
 fasta 
OCaml12.5812.581,6041042  0% 0% 100% 0%
C++ GNU g++6.306.312881266  0% 0% 100% 0%
 binary-trees 
OCaml39.9115.58100,944784  31% 56% 73% 100%
C++ GNU g++17.075.78178,988892  90% 71% 77% 59%
 n-body 
OCaml61.6461.655481239  0% 0% 0% 100%
C++ GNU g++20.1320.143201659  0% 0% 100% 0%
 mandelbrot 
OCaml85.7121.523,708710  100% 100% 100% 100%
C++ GNU g++23.745.9732,0961017  99% 99% 99% 100%
 pidigits 
OCaml17.1417.164,428869  0% 0% 0% 100%
C++ GNU g++2.762.761,452682  0% 0% 100% 0%
 k-nucleotide 
OCaml5.392.61227,2281789  28% 54% 31% 98%
C++ GNU g++1.350.4216,6443415  76% 76% 76% 100%
 fasta-redux 
No program
C++ GNU g++0.040.04?1474  0% 0% 100% 0%

 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