÷

 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
 spectral-norm±±
 regex-dna±±±
 fasta±±
 mandelbrot±
 n-body±±
 partial-sums±±
 nsieve-bits±±±
 pidigits±±
 nsieve±±±
 recursive±±
 reverse-complement±±±
 k-nucleotide±1/4±
 sum-file±±
 fannkuch±±
 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
 spectral-norm 
C++ GNU g++23.84900442  
C GNU gcc26.85428382  
 regex-dna 
C++ GNU g++5.5812,7041588  
C GNU gcc6.0913,3601099  
 fasta 
C++ GNU g++18.727881248  
C GNU gcc19.844881268  
 mandelbrot 
C++ GNU g++3.028961097  
C GNU gcc3.09372563  
 n-body 
C++ GNU g++14.629321705  
C GNU gcc14.843961173  
 partial-sums 
C++ GNU g++4.05852531  
C GNU gcc4.06352718  
 nsieve-bits 
C++ GNU g++3.863,316494  
C GNU gcc3.862,888434  
 pidigits 
C++ GNU g++1.661,052652  
C GNU gcc1.66592680  
 nsieve 
C++ GNU g++2.085,764313  
C GNU gcc2.075,320321  
 recursive 
C++ GNU g++2.401,008566  
C GNU gcc2.36432547  
 reverse-complement 
C++ GNU g++0.5413,288810  
C GNU gcc0.4912,852736  
 k-nucleotide 
C++ GNU g++7.469,3041380  
C GNU gcc6.5735,3721175  
 sum-file 
C++ GNU g++6.47852260  
C GNU gcc5.26320205  
 fannkuch 
C++ GNU g++7.78844554  
C GNU gcc5.87392628  
 binary-trees 
C++ GNU g++4.476,996541  
C GNU gcc0.853,900758  
 chameneos-redux 
C++ GNU g++16.691,0041729  
No C GNU gcc

 Measurements for all the accepted programs

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

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

gcc version 4.1.2 (Gentoo 4.1.2)

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

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

Revised BSD license