/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
 reverse-complement±1/81/2
 fannkuch-redux±16×±
 n-body±±±
 spectral-norm±
 fasta±
 regex-dna
 mandelbrot1/5±
 binary-trees1/2±
 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
 reverse-complement 
OCaml0.000.8130,8521314  43% 68% 58% 49%
C++ GNU g++1.060.68245,7122275  54% 50% 18% 37%
 fannkuch-redux 
OCaml0.0016.1719,8561017  100% 100% 100% 100%
C++ GNU g++50.3512.871,2401440  100% 94% 100% 98%
 n-body 
OCaml24.7824.796361239  0% 0% 0% 100%
C++ GNU g++19.3019.314281659  0% 100% 0% 0%
 spectral-norm 
OCaml15.834.193,376938  99% 98% 98% 98%
C++ GNU g++10.022.525041044  100% 100% 100% 100%
 fasta 
OCaml13.2513.262,7601042  0% 0% 0% 100%
C++ GNU g++6.166.173561266  0% 100% 0% 0%
 regex-dna 
OCaml1.489.38264,5001050  85% 85% 84% 99%
C++ GNU g++5.654.11163,956695  38% 76% 23% 2%
 mandelbrot 
OCaml55.6014.016,224710  100% 99% 100% 100%
C++ GNU g++24.316.1132,2961017  100% 100% 100% 100%
 binary-trees 
OCaml69.7726.19201,572784  33% 77% 59% 100%
C++ GNU g++27.338.93360,432892  64% 87% 62% 96%
 pidigits 
OCaml17.4717.507,648869  0% 0% 0% 100%
C++ GNU g++2.292.301,644682  0% 0% 0% 100%
 k-nucleotide 
OCaml77.4725.78354,9721789  93% 54% 99% 56%
C++ GNU g++10.322.97139,0163415  84% 99% 85% 82%
 fasta-redux 
No program
C++ GNU g++0.020.03?1474  0% 100% 0% 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