÷

 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
 regex-dna±1/3
 nsieve±±
 fannkuch±±±
 binary-trees±±±
 nsieve-bits±1/3
 partial-sums±1/2±
 spectral-norm±±±
 sum-file±±1/2
 k-nucleotide1/2
 reverse-complement1/2
 mandelbrot±1/2
 recursive±±
 n-body±±

± 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
 regex-dna 
OCaml5.5445,364615  
C++ GNU g++5.5812,7041588  
 nsieve 
OCaml2.169,380295  
C++ GNU g++2.085,764313  
 fannkuch 
OCaml8.30592485  
C++ GNU g++7.78844554  
 binary-trees 
OCaml4.838,732469  
C++ GNU g++4.476,996541  
 nsieve-bits 
OCaml4.415,020176  
C++ GNU g++3.863,316494  
 partial-sums 
OCaml4.64564508  
C++ GNU g++4.05852531  
 spectral-norm 
OCaml31.631,196369  
C++ GNU g++23.84900442  
 sum-file 
OCaml8.74692138  
C++ GNU g++6.47852260  
 k-nucleotide 
OCaml13.8334,636845  
C++ GNU g++7.469,3041380  
 reverse-complement 
OCaml1.0247,244540  
C++ GNU g++0.5413,288810  
 mandelbrot 
OCaml6.06716444  
C++ GNU g++3.028961097  
 recursive 
OCaml7.471,120389  
C++ GNU g++2.401,008566  
 n-body 
OCaml54.006441239  
C++ GNU g++14.629321705  
 pidigits
OCamlFailed
 chameneos-redux
   No program
 fasta
   No program

 Measurements for all the accepted programs

 OCaml : modular type-safe strict functional programming plus objects 

The Objective Caml toplevel, version 3.10.2

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

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

Revised BSD license