/mobile Handheld Friendly website

÷

 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.


Look at speed another way - look at a box plot of Time-used data.

 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
 regex-dna1/2±
 binary-trees1/21/2±
 fasta-redux±1/3±
 fasta±±±
 mandelbrot±±±
 pidigits±1/2±
 fannkuch-redux±1/3±
 reverse-complement±±
 spectral-norm±±±
 n-body±±±
 k-nucleotide±±
 C GNU gcc used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/21/2±±±±

± 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
 regex-dna 
C GNU gcc5.902.60306,8842579  43% 66% 74% 49%
C++ GNU g++15.705.0390,9441759  90% 89% 76% 57%
 binary-trees 
C GNU gcc13.095.44150,720850  94% 46% 66% 34%
C++ GNU g++27.519.04360,536892  96% 85% 66% 60%
 fasta-redux 
C GNU gcc1.681.683321321  0% 1% 1% 100%
C++ GNU g++2.002.001,0081474  0% 0% 100% 1%
 fasta 
C GNU gcc5.855.853321221  0% 1% 100% 0%
C++ GNU g++6.196.203321266  0% 0% 0% 100%
 mandelbrot 
C GNU gcc23.495.8827,008799  100% 100% 100% 100%
C++ GNU g++24.316.1132,2281017  100% 100% 100% 100%
 pidigits 
C GNU gcc2.292.29896541  2% 0% 0% 100%
C++ GNU g++2.292.301,580682  0% 0% 1% 100%
 fannkuch-redux 
C GNU gcc49.5012.713681557  100% 95% 98% 99%
C++ GNU g++48.5412.441,1641440  100% 100% 93% 98%
 reverse-complement 
C GNU gcc1.020.73476,1081867  28% 0% 88% 29%
C++ GNU g++1.070.69245,6682275  20% 16% 42% 88%
 spectral-norm 
C GNU gcc10.662.676881139  100% 100% 100% 100%
C++ GNU g++10.032.526881044  100% 100% 100% 100%
 n-body 
C GNU gcc20.7220.733281429  0% 0% 100% 0%
C++ GNU g++19.3519.363561659  0% 0% 0% 100%
 k-nucleotide 
C GNU gcc43.6716.61180,3522280  34% 38% 100% 95%
C++ GNU g++11.623.35138,5443415  83% 81% 86% 98%

 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.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)

Online book: The C Book

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

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

Revised BSD license

  Home   Conclusions   License   Help