÷

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

± 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
 nsieve 
OCaml3.7118,156295  
C++ GNU g++3.7610,788313  
 pidigits 
OCaml2.943,144560  
C++ GNU g++2.853,124652  
 binary-trees 
OCaml6.158,484469  
C++ GNU g++5.917,000541  
 spectral-norm 
OCaml18.6718,528369  
C++ GNU g++17.493,092442  
 fannkuch 
OCaml9.393,128485  
C++ GNU g++8.283,096554  
 partial-sums 
OCaml2.093,136508  
C++ GNU g++1.843,096531  
 sum-file 
OCaml7.1814,908138  
C++ GNU g++6.2914,864260  
 regex-dna 
OCaml7.5647,768615  
C++ GNU g++6.4513,4081588  
 nsieve-bits 
OCaml4.365,048413  
C++ GNU g++2.803,328494  
 reverse-complement 
OCaml1.0545,716540  
C++ GNU g++0.6313,288810  
 k-nucleotide 
OCaml13.1032,048845  
C++ GNU g++7.639,3121380  
 mandelbrot 
OCaml7.723,368444  
C++ GNU g++3.003,312584  
 recursive 
OCaml7.041,112389  
C++ GNU g++2.591,008566  
 n-body 
OCaml35.656201239  
C++ GNU g++12.789361705  
 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 native-code compiler, version 3.10.0

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

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

Revised BSD license