÷

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

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.


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

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
 n-body±1/3±
 regex-dna±±±
 partial-sums±±
 nsieve±±±
 fasta±±±
 recursive±±
 pidigits±±±
 nsieve-bits±±±
 spectral-norm±1/6±
 reverse-complement±±±
 mandelbrot±±±
 k-nucleotide±1/4±
 fannkuch±±
 sum-file±±±
 binary-trees±

± 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.

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
 n-body 
C++ GNU g++12.789361705  
C GNU gcc15.403,1001173  
 regex-dna 
C++ GNU g++6.4513,4081588  
C GNU gcc6.9212,6961099  
 partial-sums 
C++ GNU g++1.843,096531  
C GNU gcc1.93428399  
 nsieve 
C++ GNU g++3.7610,788313  
C GNU gcc3.7910,332321  
 fasta 
C++ GNU g++11.693,1201248  
C GNU gcc11.673,1081221  
 recursive 
C++ GNU g++2.591,008566  
C GNU gcc2.58480425  
 pidigits 
C++ GNU g++2.853,124652  
C GNU gcc2.843,120680  
 nsieve-bits 
C++ GNU g++2.803,328494  
C GNU gcc2.783,092434  
 spectral-norm 
C++ GNU g++17.493,092442  
C GNU gcc17.3018,488382  
 reverse-complement 
C++ GNU g++0.6313,288810  
C GNU gcc0.5812,732728  
 mandelbrot 
C++ GNU g++3.003,312584  
C GNU gcc2.753,272400  
 k-nucleotide 
C++ GNU g++7.639,3121380  
C GNU gcc6.5735,3801173  
 fannkuch 
C++ GNU g++8.283,096554  
C GNU gcc6.07384628  
 sum-file 
C++ GNU g++6.2914,864260  
C GNU gcc4.6114,852196  
 binary-trees 
C++ GNU g++5.917,000541  
C GNU gcc1.504,504743  
 chameneos-redux
   No program

 Measurements for all the accepted programs

 C++ GNU g++ : c plus objects plus generics 

C++ 1991-2006, Bjarne Stroustrup (pdf)

g++ (GCC) 4.2.3 (Debian 4.2.3-1)

Home Page: http://gcc.gnu.org/

Download: ftp://ftp.gnu.org/pub/gnu/gcc/

Revised BSD license