÷

 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.


 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
 n-body±±
 pidigits±
 spectral-norm±
 regex-dna±
 mandelbrot±
 binary-trees1/2±
 reverse-complement1/4
 fannkuch±
 fasta±±
 k-nucleotide1/2
 chameneos-redux67×±

± read the measurements and then read the program source code.

 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
 n-body 
OCaml32.6932.708161239  100% 0% 0% 0%
C++ GNU g++20.5720.569321428  0% 0% 0% 100%
 pidigits 
OCaml6.706.704,056560  0% 100% 0% 0%
C++ GNU g++3.793.791,696682  0% 100% 0% 0%
 spectral-norm 
OCaml20.026.213,304907  79% 79% 81% 81%
C++ GNU g++11.892.991,1961114  100% 99% 99% 99%
 regex-dna 
OCaml19.8311.29389,5321261  25% 86% 25% 40%
C++ GNU g++18.375.0497,4641588  87% 96% 90% 91%
 mandelbrot 
OCaml65.8716.6963,788929  99% 98% 99% 98%
C++ GNU g++25.046.2928,824858  99% 99% 100% 100%
 binary-trees 
OCaml89.5725.32157,664784  82% 85% 95% 90%
C++ GNU g++28.559.01357,820892  71% 62% 95% 82%
 reverse-complement 
OCaml2.552.56388,264582  100% 0% 0% 0%
C++ GNU g++1.210.85245,6442275  37% 13% 80% 14%
 fannkuch 
OCaml181.6446.676,288975  99% 96% 99% 97%
C++ GNU g++49.7513.741,3001186  80% 76% 100% 100%
 fasta 
OCaml13.8213.821,0001042  0% 0% 100% 0%
C++ GNU g++2.262.269641470  100% 0% 1% 0%
 k-nucleotide 
OCaml88.2537.80574,5881205  41% 25% 81% 85%
C++ GNU g++20.275.54177,1482673  99% 88% 90% 93%
 chameneos-redux 
OCaml364.49239.772,4121286  37% 33% 37% 33%
C++ GNU g++13.053.571,3281800  82% 77% 100% 100%

 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