/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±16×±
 n-body±±±
 spectral-norm1/3
 reverse-complement1/71/2
 fasta±
 mandelbrot1/121/2
 binary-trees±1/2
 regex-dna±
 pidigits±
 k-nucleotide1/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
 fannkuch-redux 
OCaml0.0064.4819,8841017  0% 0% 0% 100%
C++ GNU g++50.3550.361,2361440  0% 0% 0% 100%
 n-body 
OCaml24.7724.786321239  0% 0% 0% 100%
C++ GNU g++19.3019.314241659  0% 0% 0% 100%
 spectral-norm 
OCaml15.6915.701,696377  0% 0% 0% 100%
C++ GNU g++9.9910.007561044  0% 0% 0% 100%
 reverse-complement 
OCaml0.001.6030,8441314  3% 0% 1% 99%
C++ GNU g++0.870.89229,5162275  0% 0% 0% 100%
 fasta 
OCaml13.2513.262,7561042  0% 0% 0% 100%
C++ GNU g++6.166.163561266  0% 0% 0% 100%
 mandelbrot 
OCaml55.1455.152,756444  0% 0% 0% 100%
C++ GNU g++24.2824.2932,3001017  0% 0% 0% 100%
 binary-trees 
OCaml43.8643.91232,048496  0% 0% 0% 100%
C++ GNU g++17.2317.29296,252892  0% 0% 0% 100%
 regex-dna 
OCaml19.2219.26555,260615  0% 0% 0% 100%
C++ GNU g++5.395.40194,088695  0% 0% 0% 100%
 pidigits 
OCaml17.0917.117,612869  0% 0% 0% 100%
C++ GNU g++2.272.271,648682  0% 0% 0% 100%
 k-nucleotide 
OCaml78.0078.08354,9721789  0% 0% 0% 100%
C++ GNU g++9.859.87142,1243415  0% 0% 1% 100%
 fasta-redux 
No program
C++ GNU g++0.030.03?1474  0% 0% 25% 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