/mobile Handheld Friendly website
Ubuntu : Intel® Q6600® one 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/3 | ± | ± | |
| spectral-norm | ± | ± | ± | |
| n-body | ± | ± | ± | |
| pidigits | ± | 2× | ± | |
| reverse-complement | ± | 1/2 | ± | |
| mandelbrot | ± | ± | ± | |
| fannkuch-redux | ± | 4× | 3× | |
| binary-trees | ± | ± | ± | |
| fasta | ± | ± | ± | |
| fasta-redux | 2× | 2× | ± | |
| regex-dna | 3× | 1/3 | ± | |
| C++ GNU g++ used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | 1/3 | ± | ± | ± | ± | ± | 3× |
± 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++ | 11.86 | 11.88 | 133,472 | 3415 | 0% 0% 0% 100% |
| C GNU gcc | 38.44 | 38.46 | 153,528 | 2280 | 0% 0% 0% 100% |
| spectral-norm | |||||
| C++ GNU g++ | 10.00 | 10.01 | 608 | 1044 | 0% 0% 1% 100% |
| C GNU gcc | 10.22 | 10.23 | 608 | 1139 | 0% 0% 0% 100% |
| n-body | |||||
| C++ GNU g++ | 20.11 | 20.12 | 284 | 1659 | 0% 0% 0% 100% |
| C GNU gcc | 20.45 | 20.46 | 284 | 1173 | 0% 0% 0% 100% |
| pidigits | |||||
| C++ GNU g++ | 2.74 | 2.74 | 1,680 | 682 | 0% 1% 0% 100% |
| C GNU gcc | 2.74 | 2.74 | 1,092 | 541 | 0% 1% 0% 100% |
| reverse-complement | |||||
| C++ GNU g++ | 1.07 | 1.09 | 245,348 | 2275 | 3% 2% 2% 100% |
| C GNU gcc | 1.07 | 1.08 | 496,900 | 1867 | 1% 1% 1% 100% |
| mandelbrot | |||||
| C++ GNU g++ | 23.72 | 23.73 | 32,060 | 1017 | 0% 0% 0% 100% |
| C GNU gcc | 23.31 | 23.32 | 29,888 | 799 | 0% 0% 0% 100% |
| fannkuch-redux | |||||
| C++ GNU g++ | 47.85 | 47.86 | 952 | 1440 | 0% 0% 0% 100% |
| C GNU gcc | 45.26 | 45.27 | 252 | 567 | 0% 0% 0% 100% |
| binary-trees | |||||
| C++ GNU g++ | 12.93 | 12.95 | 148,448 | 892 | 0% 1% 1% 100% |
| C GNU gcc | 12.14 | 12.15 | 99,412 | 850 | 0% 0% 0% 100% |
| fasta | |||||
| C++ GNU g++ | 6.31 | 6.31 | 256 | 1266 | 1% 0% 0% 100% |
| C GNU gcc | 4.92 | 4.92 | 256 | 1221 | 0% 0% 0% 100% |
| fasta-redux | |||||
| C++ GNU g++ | 2.93 | 2.94 | 580 | 1474 | 1% 1% 0% 100% |
| C GNU gcc | 1.68 | 1.69 | 256 | 1321 | 1% 1% 1% 100% |
| regex-dna | |||||
| C++ GNU g++ | 17.01 | 17.01 | 94,660 | 1759 | 0% 0% 0% 100% |
| C GNU gcc | 5.82 | 5.83 | 286,796 | 2579 | 0% 0% 0% 100% |
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.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
Home Page: http://gcc.gnu.org/
Download: ftp://ftp.gnu.org/pub/gnu/gcc/