÷

 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
 binary-trees±1/2±
 mandelbrot±±±
 n-body±1/2±
 pidigits±1/2±
 spectral-norm±1/2±
 fannkuch±1/2±
 reverse-complement±1/21/3
 regex-dna±±
 fasta1/2±
 chameneos-redux1/2
 k-nucleotide12×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
 binary-trees 
C GNU gcc13.8313.84149,588850  1% 2% 1% 100%
C++ GNU g++16.5216.51296,208892  0% 1% 0% 100%
 mandelbrot 
C GNU gcc24.0924.0930,420879  0% 0% 0% 100%
C++ GNU g++25.0325.0331,448858  0% 0% 0% 100%
 n-body 
C GNU gcc20.3720.374881173  0% 0% 0% 100%
C++ GNU g++20.5720.569321428  0% 0% 0% 100%
 pidigits 
C GNU gcc3.793.791,124541  0% 0% 0% 100%
C++ GNU g++3.793.791,696682  0% 0% 1% 100%
 spectral-norm 
C GNU gcc11.8911.897321139  0% 0% 0% 100%
C++ GNU g++11.9011.891,1561114  0% 0% 0% 100%
 fannkuch 
C GNU gcc51.3851.37692937  0% 0% 0% 100%
C++ GNU g++50.3450.341,2601186  0% 0% 0% 100%
 reverse-complement 
C GNU gcc1.431.43125,272722  0% 0% 0% 100%
C++ GNU g++1.031.03245,6402275  1% 0% 1% 100%
 regex-dna 
C GNU gcc24.4724.4783,2641525  0% 0% 0% 100%
C++ GNU g++12.6412.64100,4361759  0% 0% 0% 100%
 fasta 
C GNU gcc5.735.734721221  0% 0% 0% 100%
C++ GNU g++2.262.269641470  1% 1% 0% 100%
 chameneos-redux 
C GNU gcc9.249.246522879  0% 0% 0% 100%
C++ GNU g++3.393.391,3961606  0% 0% 0% 100%
 k-nucleotide 
C GNU gcc78.5078.501,682,7641141  0% 0% 0% 100%
C++ GNU g++11.4111.41142,2643415  0% 0% 0% 100%

 Measurements for all the accepted programs

 C GNU gcc : unchecked low-level programming 

gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)

Online book: The C Book

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

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

Revised BSD license