÷

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

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

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


 Step 2 : Are the OCaml programs faster? Approximately.

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

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 Reduced N
 fannkuch±±1/2
 regex-dna1/2
 n-body±±
 spectral-norm1/3
 pidigits±
 reverse-complement1/4
 mandelbrot±
 binary-trees1/2±
 fasta±±
 k-nucleotide1/3
 chameneos-redux17×±±

± 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.

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 
OCaml63.4863.48932485  0% 0% 0% 100%
C++ GNU g++50.3450.341,2601186  0% 0% 0% 100%
 regex-dna 
OCaml19.7319.74389,536892  0% 0% 0% 100%
C++ GNU g++12.6412.64100,4361759  0% 0% 0% 100%
 n-body 
OCaml32.6532.658161239  0% 0% 0% 100%
C++ GNU g++20.5720.569321428  0% 0% 0% 100%
 spectral-norm 
OCaml20.2320.241,788377  0% 0% 0% 100%
C++ GNU g++11.9011.891,1561114  0% 0% 0% 100%
 pidigits 
OCaml6.706.703,992560  0% 0% 0% 100%
C++ GNU g++3.793.791,696682  0% 0% 1% 100%
 reverse-complement 
OCaml2.552.55388,260582  0% 0% 0% 100%
C++ GNU g++1.031.03245,6402275  1% 0% 1% 100%
 mandelbrot 
OCaml65.7865.7863,984929  0% 0% 0% 100%
C++ GNU g++25.0325.0331,448858  0% 0% 0% 100%
 binary-trees 
OCaml51.6551.65157,668784  0% 0% 0% 100%
C++ GNU g++16.5216.51296,208892  0% 1% 0% 100%
 fasta 
OCaml13.6313.649961042  0% 0% 0% 100%
C++ GNU g++2.262.269641470  1% 1% 0% 100%
 k-nucleotide 
OCaml88.0988.09574,5881205  0% 0% 0% 100%
C++ GNU g++11.4111.41142,2643415  0% 0% 0% 100%
 chameneos-redux 
OCaml57.5157.512,0321279  0% 0% 0% 100%
C++ GNU g++3.393.391,3961606  0% 0% 0% 100%

 Measurements for all the accepted programs

 OCaml : modular type-safe strict functional programming plus objects 

The Objective Caml native-code compiler, version 3.11.0

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

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

Revised BSD license