÷

 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.


 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/141/10
 regex-dna1/6±±
 fasta1/3±
 reverse-complement1/2
 spectral-norm±±
 pidigits±±±
 n-body±±
 mandelbrot±±±
 fannkuch±±
 binary-trees±±
 chameneos-redux1/2

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

 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++20.275.54177,1482673  99% 88% 90% 93%
GNU gcc78.1778.171,702,4161141  0% 0% 100% 0%
 regex-dna 
C++ GNU g++18.375.0497,4641588  87% 96% 90% 91%
GNU gcc31.0631.06124,7801099  100% 0% 0% 0%
 fasta 
C++ GNU g++2.262.269641470  100% 0% 1% 0%
GNU gcc5.745.734761221  0% 0% 100% 0%
 reverse-complement 
C++ GNU g++1.210.85245,6442275  37% 13% 80% 14%
GNU gcc1.441.44125,276722  100% 0% 1% 0%
 spectral-norm 
C++ GNU g++11.892.991,1961114  100% 99% 99% 99%
GNU gcc11.872.997721139  99% 100% 99% 99%
 pidigits 
C++ GNU g++3.793.791,696682  0% 100% 0% 0%
GNU gcc3.793.791,132541  99% 0% 0% 0%
 n-body 
C++ GNU g++20.5720.569321428  0% 0% 0% 100%
GNU gcc20.3720.375161173  100% 0% 0% 0%
 mandelbrot 
C++ GNU g++25.046.2928,824858  99% 99% 100% 100%
GNU gcc24.236.0727,900879  100% 100% 100% 100%
 fannkuch 
C++ GNU g++49.7513.741,3001186  80% 76% 100% 100%
GNU gcc51.4312.97700937  99% 99% 99% 100%
 binary-trees 
C++ GNU g++28.559.01357,820892  71% 62% 95% 82%
GNU gcc15.046.30151,220850  42% 25% 84% 69%
 chameneos-redux 
C++ GNU g++13.053.571,3281800  82% 77% 100% 100%
GNU gcc3.140.796842879  99% 99% 99% 99%

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

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

gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)

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

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

Revised BSD license