/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 C++ GNU g++ program used compared to the fastest C GNU gcc 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 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 | |
| k-nucleotide | 1/6 | ± | ± | |
| n-body | ± | ± | ± | |
| spectral-norm | ± | ± | ± | |
| reverse-complement | ± | 1/2 | ± | |
| pidigits | ± | 2× | ± | |
| fannkuch-redux | ± | 3× | ± | |
| mandelbrot | ± | ± | ± | |
| fasta | ± | ± | ± | |
| fasta-redux | ± | 2× | ± | |
| binary-trees | 2× | 2× | ± | |
| regex-dna | 2× | 1/2 | 1/4 | |
| C++ GNU g++ used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | 1/6 | ± | ± | ± | ± | ± | 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 ~ speed and size.
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++ | 10.32 | 2.97 | 139,016 | 3415 | 84% 99% 85% 82% |
| C GNU gcc | 43.62 | 16.59 | 180,384 | 2280 | 97% 35% 94% 38% |
| n-body | |||||
| C++ GNU g++ | 19.30 | 19.31 | 428 | 1659 | 0% 100% 0% 0% |
| C GNU gcc | 20.72 | 20.72 | 360 | 1429 | 0% 0% 0% 100% |
| spectral-norm | |||||
| C++ GNU g++ | 10.02 | 2.52 | 504 | 1044 | 100% 100% 100% 100% |
| C GNU gcc | 10.65 | 2.67 | 504 | 1139 | 100% 100% 100% 100% |
| reverse-complement | |||||
| C++ GNU g++ | 1.06 | 0.68 | 245,712 | 2275 | 54% 50% 18% 37% |
| C GNU gcc | 1.01 | 0.71 | 390,072 | 1867 | 4% 87% 25% 30% |
| pidigits | |||||
| C++ GNU g++ | 2.29 | 2.30 | 1,644 | 682 | 0% 0% 0% 100% |
| C GNU gcc | 2.29 | 2.29 | 924 | 541 | 0% 100% 0% 0% |
| fannkuch-redux | |||||
| C++ GNU g++ | 50.35 | 12.87 | 1,240 | 1440 | 100% 94% 100% 98% |
| C GNU gcc | 50.34 | 12.84 | 396 | 1557 | 95% 99% 100% 99% |
| mandelbrot | |||||
| C++ GNU g++ | 24.31 | 6.11 | 32,296 | 1017 | 100% 100% 100% 100% |
| C GNU gcc | 23.48 | 5.88 | 27,156 | 799 | 100% 100% 100% 100% |
| fasta | |||||
| C++ GNU g++ | 6.16 | 6.17 | 356 | 1266 | 0% 100% 0% 0% |
| C GNU gcc | 5.84 | 5.85 | 356 | 1221 | 0% 1% 0% 100% |
| fasta-redux | |||||
| C++ GNU g++ | 2.00 | 2.00 | 820 | 1474 | 0% 100% 0% 1% |
| C GNU gcc | 1.68 | 1.68 | 356 | 1321 | 0% 100% 2% 1% |
| binary-trees | |||||
| C++ GNU g++ | 27.33 | 8.93 | 360,432 | 892 | 64% 87% 62% 96% |
| C GNU gcc | 13.68 | 5.51 | 150,784 | 850 | 20% 65% 85% 79% |
| regex-dna | |||||
| C++ GNU g++ | 5.65 | 4.11 | 163,956 | 695 | 38% 76% 23% 2% |
| C GNU gcc | 5.73 | 2.49 | 317,412 | 2579 | 43% 70% 50% 69% |
Remember - those are just the fastest C++ GNU g++ and C GNU gcc programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for C++ GNU g++.
Maybe one of those other C++ GNU g++ programs is fastest on a different OS/machine.
Remember - those are just the fastest C++ GNU g++ and C GNU gcc 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.
C++ 1991-2006, Bjarne Stroustrup (pdf)
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
Home Page: http://gcc.gnu.org/
Download: ftp://ftp.gnu.org/pub/gnu/gcc/