÷

 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
 k-nucleotide1/41/6
 chameneos-redux1/31/2
 regex-dna1/2±±
 fasta±±
 reverse-complement±
 spectral-norm±±
 pidigits±±
 mandelbrot±±±
 n-body±±
 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
 k-nucleotide 
C++ GNU g++13.6113.61132,8643415  0% 0% 0% 100%
C GNU gcc53.8453.83843,1321141  0% 0% 0% 100%
 chameneos-redux 
C++ GNU g++4.024.021,2441606  0% 0% 0% 100%
C GNU gcc10.4810.485562879  0% 0% 0% 100%
 regex-dna 
C++ GNU g++14.1914.19100,3321759  0% 0% 0% 100%
C GNU gcc25.5525.5581,5681525  0% 0% 0% 100%
 fasta 
C++ GNU g++3.763.778161470  0% 0% 0% 100%
C GNU gcc5.195.193961221  0% 0% 0% 100%
 reverse-complement 
C++ GNU g++1.121.12245,4322275  1% 0% 1% 100%
C GNU gcc1.381.38125,188722  0% 0% 2% 100%
 spectral-norm 
C++ GNU g++11.9411.941,0041114  0% 0% 1% 100%
C GNU gcc11.9511.946641139  0% 0% 0% 100%
 pidigits 
C++ GNU g++2.712.711,596682  0% 0% 1% 100%
C GNU gcc2.712.711,008541  0% 0% 0% 100%
 mandelbrot 
C++ GNU g++24.5524.5530,564858  0% 0% 0% 100%
C GNU gcc24.3524.3530,048879  0% 0% 0% 100%
 n-body 
C++ GNU g++23.8123.817881428  0% 1% 0% 100%
C GNU gcc23.5223.524161429  0% 0% 0% 100%
 fannkuch 
C++ GNU g++50.0150.011,1241186  0% 0% 0% 100%
C GNU gcc47.7647.76552937  0% 0% 0% 100%
 binary-trees 
C++ GNU g++13.4713.47148,652892  0% 0% 0% 100%
C GNU gcc12.2312.2399,528850  0% 0% 0% 100%

 Measurements for all the accepted programs

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

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

gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8)

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

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

Revised BSD license