Compare the performance of OCaml programs against some other language implementation.

For more information about the OCaml implementation we measured see ↓ about OCaml.

Compare to:

 OCaml comparison summary


1/2 1/3 1/4 … OCaml is better
Programs Time Memory Use Source Size Reduced N
k-nucleotide  No GNU g++
binary-trees1/3±±
regex-dna1/29± 500,000
fannkuch1/242
spectral-norm23±
fasta2±±
n-body3±±
reverse-complement4±1/3
pidigits8±±
mandelbrot102±
chameneos-redux67±±

± look at the measurements

 OCaml comparison measurements

Program & Logs CPU secs Memory KB Size B Elapsed secs ~ CPU Load
 binary-trees 
OCaml #254.0978,85278415.45  81% 100% 79% 90%
C++ GNU g++ #240.8099,39655340.79  0% 0% 0% 100%
 regex-dna N = 500,000 reduced workload 
OCaml2.2296,44812611.26  24% 49% 83% 30%
C++ GNU g++ #32.8810,93215992.88  0% 100% 0% 0%
 fannkuch 
OCaml #2178.794,00497546.77  93% 100% 94% 95%
C++ GNU g++ #271.421,09255471.41  100% 0% 0% 0%
 spectral-norm 
OCaml #318.583,1129075.80  77% 83% 79% 81%
C++ GNU g++ #712.011,03211143.01  100% 100% 100% 100%
 fasta 
OCaml #312.88728104212.88  0% 93% 0% 0%
C++ GNU g++ #46.0774412666.07  0% 100% 0% 0%
 n-body 
OCaml60.14680123960.14  0% 100% 0% 0%
C++ GNU g++ #423.84788142823.84  1% 0% 100% 0%
 reverse-complement 
OCaml #24.78168,9243944.78  100% 0% 0% 0%
C++ GNU g++ #21.81245,09210981.13  15% 31% 21% 88%
 pidigits 
OCaml #221.022,37251021.02  0% 100% 0% 0%
C++ GNU g++ #32.711,5966822.72  0% 9% 7% 100%
 mandelbrot 
OCaml #2230.9257,61692960.54  94% 100% 97% 94%
C++ GNU g++ #524.7028,8008586.18  100% 100% 100% 100%
 chameneos-redux 
OCaml #2341.521,5521286232.50  38% 29% 39% 28%
C++ GNU g++ #412.101,16018003.46  83% 76% 99% 100%

 about OCaml

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