÷

 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.


 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±
 mandelbrot±±±
 n-body±1/2±
 pidigits±±±
 spectral-norm±1/2±
 reverse-complement1/21/3
 fasta1/2±
 regex-dna±±
 k-nucleotide14×10×1/2

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

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

 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