/mobile Handheld Friendly website
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 | |
| regex-dna | ± | 56× | 2× | |
| reverse-complement | ± | 1/20 | 1/2 | |
| fannkuch-redux | 2× | 17× | ± | |
| spectral-norm | 2× | 8× | ± | |
| fasta | 2× | 6× | ± | |
| binary-trees | 3× | 1/2 | ± | |
| n-body | 3× | 2× | ± | |
| mandelbrot | 4× | 1/9 | ± | |
| pidigits | 6× | 3× | ± | |
| k-nucleotide | 6× | 14× | 1/2 | |
| OCaml used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | ± | ± | 2× | 2× | 4× | 6× | 6× |
± 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 |
|---|---|---|---|---|---|
| regex-dna | |||||
| OCaml | 0.10 | 0.54 | 414,028 | 1050 | 81% 80% 98% 81% |
| C++ GNU g++ | 0.62 | 0.55 | 7,396 | 695 | 39% 22% 2% 69% |
| reverse-complement | |||||
| OCaml | 0.00 | 0.94 | 12,468 | 1314 | 51% 56% 60% 80% |
| C++ GNU g++ | 1.25 | 0.86 | 245,456 | 2275 | 51% 15% 33% 49% |
| fannkuch-redux | |||||
| OCaml | 0.00 | 26.11 | 17,456 | 1017 | 100% 100% 100% 100% |
| C++ GNU g++ | 61.42 | 15.77 | 1,020 | 1439 | 100% 97% 97% 96% |
| spectral-norm | |||||
| OCaml | 17.97 | 4.78 | 3,036 | 938 | 99% 99% 99% 99% |
| C++ GNU g++ | 10.03 | 2.52 | 388 | 1044 | 100% 100% 100% 100% |
| fasta | |||||
| OCaml | 12.58 | 12.58 | 1,604 | 1042 | 0% 0% 100% 0% |
| C++ GNU g++ | 6.30 | 6.31 | 288 | 1266 | 0% 0% 100% 0% |
| binary-trees | |||||
| OCaml | 39.91 | 15.58 | 100,944 | 784 | 31% 56% 73% 100% |
| C++ GNU g++ | 17.07 | 5.78 | 178,988 | 892 | 90% 71% 77% 59% |
| n-body | |||||
| OCaml | 61.64 | 61.65 | 548 | 1239 | 0% 0% 0% 100% |
| C++ GNU g++ | 20.13 | 20.14 | 320 | 1659 | 0% 0% 100% 0% |
| mandelbrot | |||||
| OCaml | 85.71 | 21.52 | 3,708 | 710 | 100% 100% 100% 100% |
| C++ GNU g++ | 23.74 | 5.97 | 32,096 | 1017 | 99% 99% 99% 100% |
| pidigits | |||||
| OCaml | 17.14 | 17.16 | 4,428 | 869 | 0% 0% 0% 100% |
| C++ GNU g++ | 2.76 | 2.76 | 1,452 | 682 | 0% 0% 100% 0% |
| k-nucleotide | |||||
| OCaml | 5.39 | 2.61 | 227,228 | 1789 | 28% 54% 31% 98% |
| C++ GNU g++ | 1.35 | 0.42 | 16,644 | 3415 | 76% 76% 76% 100% |
| fasta-redux | |||||
| C++ GNU g++ | 0.04 | 0.04 | ? | 1474 | 0% 0% 100% 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