x64 Ubuntu : Intel® Q6600® quad-core |
This chart shows 3 comparisons - Time-used, Memory-used and Code-used.
Each chart bar shows, for one unidentified benchmark, how much the fastest C++ GNU g++ program used compared to the fastest C GNU gcc program.
This table shows 3 comparisons - Time-used, Memory-used and Code-used.
Each table row shows, for one named benchmark, how much the fastest C++ GNU g++ program used compared to the fastest C GNU gcc program.
| C++ GNU g++ used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | Reduced N |
| k-nucleotide | 1/14 | 1/10 | 2× | |
| regex-dna | 1/6 | ± | ± | |
| fasta | 1/3 | 2× | ± | |
| reverse-complement | 1/2 | 2× | 3× | |
| spectral-norm | ± | 2× | ± | |
| pidigits | ± | ± | ± | |
| n-body | ± | 2× | ± | |
| mandelbrot | ± | ± | ± | |
| fannkuch | ± | 2× | ± | |
| binary-trees | ± | 2× | ± | |
| chameneos-redux | 4× | 2× | 1/2 | |
± read the measurements and then read the program source code.
This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ~ CPU Load.
For each named benchmark, measurements of the fastest C++ GNU g++ program are shown for comparison against measurements of the fastest C GNU gcc program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ~ CPU Load |
|---|---|---|---|---|---|
| k-nucleotide | |||||
| C++ GNU g++ | 20.27 | 5.54 | 177,148 | 2673 | 99% 88% 90% 93% |
| C GNU gcc | 78.17 | 78.17 | 1,702,416 | 1141 | 0% 0% 100% 0% |
| regex-dna | |||||
| C++ GNU g++ | 18.37 | 5.04 | 97,464 | 1588 | 87% 96% 90% 91% |
| C GNU gcc | 31.06 | 31.06 | 124,780 | 1099 | 100% 0% 0% 0% |
| fasta | |||||
| C++ GNU g++ | 2.26 | 2.26 | 964 | 1470 | 100% 0% 1% 0% |
| C GNU gcc | 5.74 | 5.73 | 476 | 1221 | 0% 0% 100% 0% |
| reverse-complement | |||||
| C++ GNU g++ | 1.21 | 0.85 | 245,644 | 2275 | 37% 13% 80% 14% |
| C GNU gcc | 1.44 | 1.44 | 125,276 | 722 | 100% 0% 1% 0% |
| spectral-norm | |||||
| C++ GNU g++ | 11.89 | 2.99 | 1,196 | 1114 | 100% 99% 99% 99% |
| C GNU gcc | 11.87 | 2.99 | 772 | 1139 | 99% 100% 99% 99% |
| pidigits | |||||
| C++ GNU g++ | 3.79 | 3.79 | 1,696 | 682 | 0% 100% 0% 0% |
| C GNU gcc | 3.79 | 3.79 | 1,132 | 541 | 99% 0% 0% 0% |
| n-body | |||||
| C++ GNU g++ | 20.57 | 20.56 | 932 | 1428 | 0% 0% 0% 100% |
| C GNU gcc | 20.37 | 20.37 | 516 | 1173 | 100% 0% 0% 0% |
| mandelbrot | |||||
| C++ GNU g++ | 25.04 | 6.29 | 28,824 | 858 | 99% 99% 100% 100% |
| C GNU gcc | 24.23 | 6.07 | 27,900 | 879 | 100% 100% 100% 100% |
| fannkuch | |||||
| C++ GNU g++ | 49.75 | 13.74 | 1,300 | 1186 | 80% 76% 100% 100% |
| C GNU gcc | 51.43 | 12.97 | 700 | 937 | 99% 99% 99% 100% |
| binary-trees | |||||
| C++ GNU g++ | 28.55 | 9.01 | 357,820 | 892 | 71% 62% 95% 82% |
| C GNU gcc | 15.04 | 6.30 | 151,220 | 850 | 42% 25% 84% 69% |
| chameneos-redux | |||||
| C++ GNU g++ | 13.05 | 3.57 | 1,328 | 1800 | 82% 77% 100% 100% |
| C GNU gcc | 3.14 | 0.79 | 684 | 2879 | 99% 99% 99% 99% |
C++ 1991-2006, Bjarne Stroustrup (pdf)
gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
Home Page: http://gcc.gnu.org/
Download: ftp://ftp.gnu.org/pub/gnu/gcc/