/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±
 fasta-redux1/21/2±
 fasta±±±
 binary-trees±1/2±
 mandelbrot±±±
 pidigits±1/2±
 reverse-complement±±
 n-body±±±
 spectral-norm±±±
 fannkuch-redux±1/3±
 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 gcc6.422.90288,0402579  44% 45% 75% 69%
C++ GNU g++17.065.7994,8961759  74% 60% 64% 100%
 fasta-redux 
C GNU gcc1.681.692561321  0% 100% 0% 1%
C++ GNU g++2.942.945801474  1% 0% 0% 100%
 fasta 
C GNU gcc4.924.932561221  0% 0% 0% 100%
C++ GNU g++6.316.312561266  0% 100% 0% 0%
 binary-trees 
C GNU gcc12.814.85100,460850  23% 82% 95% 63%
C++ GNU g++16.925.91173,424892  67% 90% 69% 58%
 mandelbrot 
C GNU gcc23.345.8527,452799  100% 100% 100% 100%
C++ GNU g++23.755.9732,0601017  99% 100% 99% 99%
 pidigits 
C GNU gcc2.742.741,092541  0% 0% 0% 100%
C++ GNU g++2.742.751,680682  0% 100% 0% 0%
 reverse-complement 
C GNU gcc1.160.87496,9001867  24% 26% 0% 89%
C++ GNU g++1.270.87245,4322275  51% 21% 39% 43%
 n-body 
C GNU gcc20.4620.472841173  0% 0% 0% 100%
C++ GNU g++20.1520.152841659  0% 0% 0% 100%
 spectral-norm 
C GNU gcc10.252.586081139  100% 100% 100% 100%
C++ GNU g++10.042.526081044  100% 100% 100% 100%
 fannkuch-redux 
C GNU gcc54.4714.282921557  93% 95% 93% 100%
C++ GNU g++47.9912.239521440  100% 96% 100% 98%
 k-nucleotide 
C GNU gcc41.5015.95153,6882280  36% 88% 96% 43%
C++ GNU g++12.463.71131,9523415  79% 84% 80% 95%

 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