/mobile Handheld Friendly website
x64 Ubuntu : Intel® Q6600® quad-core |
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.
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/8 | 1/2 | |
| fannkuch-redux | ± | 16× | ± | |
| n-body | ± | ± | ± | |
| spectral-norm | 2× | 7× | ± | |
| fasta | 2× | 8× | ± | |
| regex-dna | 2× | 2× | 2× | |
| mandelbrot | 2× | 1/5 | ± | |
| binary-trees | 3× | 1/2 | ± | |
| pidigits | 8× | 5× | ± | |
| k-nucleotide | 9× | 3× | 1/2 | |
| OCaml used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | ± | ± | ± | 2× | 3× | 5× | 9× |
± read the measurements and then read the program source code.
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 | |||||
| OCaml | 0.00 | 0.81 | 30,852 | 1314 | 43% 68% 58% 49% |
| C++ GNU g++ | 1.06 | 0.68 | 245,712 | 2275 | 54% 50% 18% 37% |
| fannkuch-redux | |||||
| OCaml | 0.00 | 16.17 | 19,856 | 1017 | 100% 100% 100% 100% |
| C++ GNU g++ | 50.35 | 12.87 | 1,240 | 1440 | 100% 94% 100% 98% |
| n-body | |||||
| OCaml | 24.78 | 24.79 | 636 | 1239 | 0% 0% 0% 100% |
| C++ GNU g++ | 19.30 | 19.31 | 428 | 1659 | 0% 100% 0% 0% |
| spectral-norm | |||||
| OCaml | 15.83 | 4.19 | 3,376 | 938 | 99% 98% 98% 98% |
| C++ GNU g++ | 10.02 | 2.52 | 504 | 1044 | 100% 100% 100% 100% |
| fasta | |||||
| OCaml | 13.25 | 13.26 | 2,760 | 1042 | 0% 0% 0% 100% |
| C++ GNU g++ | 6.16 | 6.17 | 356 | 1266 | 0% 100% 0% 0% |
| regex-dna | |||||
| OCaml | 1.48 | 9.38 | 264,500 | 1050 | 85% 85% 84% 99% |
| C++ GNU g++ | 5.65 | 4.11 | 163,956 | 695 | 38% 76% 23% 2% |
| mandelbrot | |||||
| OCaml | 55.60 | 14.01 | 6,224 | 710 | 100% 99% 100% 100% |
| C++ GNU g++ | 24.31 | 6.11 | 32,296 | 1017 | 100% 100% 100% 100% |
| binary-trees | |||||
| OCaml | 69.77 | 26.19 | 201,572 | 784 | 33% 77% 59% 100% |
| C++ GNU g++ | 27.33 | 8.93 | 360,432 | 892 | 64% 87% 62% 96% |
| pidigits | |||||
| OCaml | 17.47 | 17.50 | 7,648 | 869 | 0% 0% 0% 100% |
| C++ GNU g++ | 2.29 | 2.30 | 1,644 | 682 | 0% 0% 0% 100% |
| k-nucleotide | |||||
| OCaml | 77.47 | 25.78 | 354,972 | 1789 | 93% 54% 99% 56% |
| C++ GNU g++ | 10.32 | 2.97 | 139,016 | 3415 | 84% 99% 85% 82% |
| fasta-redux | |||||
| C++ GNU g++ | 0.02 | 0.03 | ? | 1474 | 0% 100% 0% 0% |
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.
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.
The Objective Caml native-code compiler, version 3.12.1
Home Page: http://www.ocaml.org/
Download: http://caml.inria.fr/download.en.html