OCaml versus C++ g++ fastest programs Always look at the source code. These are only the fastest programs. Look at the other programs. They may seem more-like a fair comparison to you. pidigits source secs mem gz busy cpu load OCaml 1.76 6,056 593 1.98 100% 6% 3% 4% C++ g++ 1.82 4,312 513 1.87 1% 1% 2% 100% fannkuch-redux source secs mem gz busy cpu load OCaml 16.37 19,584 1004 65.39 100% 100% 100% 100% C++ g++ 10.71 1,708 980 42.33 100% 96% 100% 100% reverse-complement source secs mem gz busy cpu load OCaml 3.74 33,944 1368 8.90 62% 58% 60% 59% C++ g++ 1.89 499,672 2093 1.94 100% 2% 1% 1% binary-trees source secs mem gz busy cpu load OCaml 9.89 152,992 751 28.64 49% 64% 98% 79% C++ g++ 3.96 113,236 809 12.86 74% 84% 98% 69% n-body source secs mem gz busy cpu load OCaml 21.67 1,368 1251 23.26 3% 1% 100% 4% C++ g++ 7.70 1,612 1879 7.81 100% 0% 1% 1% fasta source secs mem gz busy cpu load OCaml 6.00 199,124 1189 6.32 100% 1% 1% 4% C++ g++ 1.46 2,024 2711 4.40 75% 76% 75% 76% k-nucleotide source secs mem gz busy cpu load OCaml 21.32 255,548 1833 59.79 91% 48% 100% 42% C++ g++ 3.88 156,164 1631 12.09 72% 92% 71% 77% spectral-norm source secs mem gz busy cpu load OCaml 15.70 3,704 377 16.86 100% 3% 5% 0% C++ g++ 1.99 2,408 1044 7.89 99% 99% 99% 99% mandelbrot source secs mem gz busy cpu load OCaml 14.02 5,048 717 55.89 99% 100% 100% 100% C++ g++ 1.51 26,256 1791 6.01 100% 99% 99% 99% regex-redux source secs mem gz busy cpu load OCaml 25.23 901,944 637 27.09 4% 1% 100% 3% C++ g++ 1.86 203,856 1315 4.49 99% 50% 48% 44% OCaml The OCaml native-code compiler, version 4.10.0 C++ g++ g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0 all OCaml programs & measurements all C++ g++ programs & measurements