/mobile Handheld Friendly website

÷

 Step 1 : Are the C++ GNU g++ programs faster? At a glance.

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.

 Step 2 : Are the C++ GNU g++ programs faster? Approximately.

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-nucleotide1/6±±
 n-body±±±
 spectral-norm±±±
 reverse-complement±1/2±
 pidigits±±
 fannkuch-redux±±
 mandelbrot±±±
 fasta±±±
 fasta-redux±±
 binary-trees±
 regex-dna1/21/4
 C++ GNU g++ used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/6±±±±±

± read the measurements and then read the program source code.

 Step 3 : Are the C++ GNU g++ programs faster? Measurements.

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.322.97139,0163415  84% 99% 85% 82%
C GNU gcc43.6216.59180,3842280  97% 35% 94% 38%
 n-body 
C++ GNU g++19.3019.314281659  0% 100% 0% 0%
C GNU gcc20.7220.723601429  0% 0% 0% 100%
 spectral-norm 
C++ GNU g++10.022.525041044  100% 100% 100% 100%
C GNU gcc10.652.675041139  100% 100% 100% 100%
 reverse-complement 
C++ GNU g++1.060.68245,7122275  54% 50% 18% 37%
C GNU gcc1.010.71390,0721867  4% 87% 25% 30%
 pidigits 
C++ GNU g++2.292.301,644682  0% 0% 0% 100%
C GNU gcc2.292.29924541  0% 100% 0% 0%
 fannkuch-redux 
C++ GNU g++50.3512.871,2401440  100% 94% 100% 98%
C GNU gcc50.3412.843961557  95% 99% 100% 99%
 mandelbrot 
C++ GNU g++24.316.1132,2961017  100% 100% 100% 100%
C GNU gcc23.485.8827,156799  100% 100% 100% 100%
 fasta 
C++ GNU g++6.166.173561266  0% 100% 0% 0%
C GNU gcc5.845.853561221  0% 1% 0% 100%
 fasta-redux 
C++ GNU g++2.002.008201474  0% 100% 0% 1%
C GNU gcc1.681.683561321  0% 100% 2% 1%
 binary-trees 
C++ GNU g++27.338.93360,432892  64% 87% 62% 96%
C GNU gcc13.685.51150,784850  20% 65% 85% 79%
 regex-dna 
C++ GNU g++5.654.11163,956695  38% 76% 23% 2%
C GNU gcc5.732.49317,4122579  43% 70% 50% 69%

 Step 4 : Are there other C++ GNU g++ programs for these benchmarks?

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.

 Step 5 : Are there other faster programs for these benchmarks?

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++ GNU g++ : c plus objects plus generics 

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/

Revised BSD license

  Home   Conclusions   License   Help