÷

 Step 1 : Are the C GNU gcc 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 gcc program used compared to the fastest C++ GNU g++ program.


 Step 2 : Are the C GNU gcc 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 gcc program used compared to the fastest C++ GNU g++ program.

 C GNU gcc used what fraction? used how many times more? 
Benchmark Time Memory Code Reduced N
 chameneos-redux1/41/2±
 binary-trees±1/2±
 fannkuch±1/2±
 n-body±1/2±
 mandelbrot±±±
 pidigits±1/2±
 spectral-norm±1/2±
 fasta±1/2±
 reverse-complement±1/21/3
 regex-dna±±
 k-nucleotide13×1/3

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

 Step 3 : Are the C GNU gcc 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 gcc program are shown for comparison against measurements of the fastest C++ GNU g++ program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ~ CPU Load
 chameneos-redux 
C GNU gcc2.840.725802879  100% 97% 99% 100%
C++ GNU g++11.332.881,1681994  99% 99% 100% 97%
 binary-trees 
C GNU gcc13.715.10100,688850  50% 34% 85% 81%
C++ GNU g++18.866.32173,332892  60% 74% 74% 71%
 fannkuch 
C GNU gcc50.5412.88552937  98% 100% 98% 98%
C++ GNU g++49.6113.631,1601186  81% 77% 100% 100%
 n-body 
C GNU gcc23.5223.524161429  100% 0% 0% 0%
C++ GNU g++23.8223.827881428  100% 0% 0% 0%
 mandelbrot 
C GNU gcc24.386.1127,248879  100% 100% 100% 100%
C++ GNU g++24.676.1730,436858  100% 100% 100% 100%
 pidigits 
C GNU gcc2.712.711,012541  0% 100% 0% 0%
C++ GNU g++2.712.711,600682  0% 0% 0% 100%
 spectral-norm 
C GNU gcc12.003.006881139  100% 100% 100% 100%
C++ GNU g++11.983.001,0321114  100% 100% 100% 100%
 fasta 
C GNU gcc5.185.193961221  100% 0% 0% 0%
C++ GNU g++3.783.788161470  99% 1% 0% 0%
 reverse-complement 
C GNU gcc1.371.37125,192722  100% 1% 1% 1%
C++ GNU g++1.340.92245,4402275  68% 50% 14% 15%
 regex-dna 
C GNU gcc26.158.5094,7121525  67% 73% 67% 100%
C++ GNU g++14.674.7897,0641759  84% 60% 100% 63%
 k-nucleotide 
C GNU gcc53.9653.96802,9281141  0% 0% 0% 100%
C++ GNU g++14.804.31132,4523415  81% 80% 99% 84%

 Measurements for all the accepted programs

 C GNU gcc : unchecked low-level programming 

gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8)

Online book: The C Book

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

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

Revised BSD license