÷

 Step 1 : Are the C GNU gcc programs faster? At a glance.

This chart shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.

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 ~ speed and size.

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
 fannkuch±1/2±
 k-nucleotide±±
 reverse-complement±±±
 pidigits±1/2±
 mandelbrot±1/21/2
 n-body±1/2±
 partial-sums±1/2±
 fasta±1/2±
 regex-dna±±±
 spectral-norm±1/2±
 nsieve-bits±±±
 recursive±1/3±
 nsieve±
 binary-trees±

± 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 ~ speed and size.

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
 fannkuch 
C GNU gcc0.05392628  
C++ GNU g++0.06844554  
 k-nucleotide 
C GNU gcc6.5735,3721175  
C++ GNU g++7.469,3041380  
 reverse-complement 
C GNU gcc0.4912,852736  
C++ GNU g++0.5413,288810  
 pidigits 
C GNU gcc0.06488680  
C++ GNU g++0.07948652  
 mandelbrot 
C GNU gcc0.14372563  
C++ GNU g++0.148961097  
 n-body 
C GNU gcc13.863961186  
C++ GNU g++14.629321705  
 partial-sums 
C GNU gcc3.19404479  
C++ GNU g++3.21952709  
 fasta 
C GNU gcc19.844881268  
C++ GNU g++18.727881248  
 regex-dna 
C GNU gcc6.0913,3601099  
C++ GNU g++5.5812,7041588  
 spectral-norm 
C GNU gcc26.85428382  
C++ GNU g++23.84900442  
 nsieve-bits 
C GNU gcc0.721,568441  
C++ GNU g++0.621,440494  
 recursive 
C GNU gcc0.20340547  
C++ GNU g++0.16884566  
 nsieve 
C GNU gcc2.075,320321  
C++ GNU g++1.291,468379  
 binary-trees 
C GNU gcc0.853,900758  
C++ GNU g++0.262,192814  
 chameneos-redux 
C GNU gccFailed
C++ GNU g++0.219361729  

 Step 4 : Are there other C GNU gcc programs for these benchmarks?

Remember - those are just the fastest C GNU gcc and C++ GNU g++ programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for C GNU gcc.

Maybe one of those other C GNU gcc programs is fastest on a different OS/machine.

 Step 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest C GNU gcc and C++ GNU g++ programs measured on this OS/machine. Check if there are faster implementations of these benchmark programs for other programming languages.

Maybe one of those other programs is fastest on a different OS/machine.

 C GNU gcc : unchecked low-level programming 

gcc version 4.1.2 (Gentoo 4.1.2)

Online book: The C Book

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

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

Revised BSD license

  Home   Flawed   Fastest   License   Help