/mobile Handheld Friendly website

÷

 Step 1 : Are the C++ GNU g++ 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 g++ program used compared to the fastest C GNU gcc program.


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

 Step 2 : Are the C++ GNU g++ 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 g++ program used compared to the fastest C GNU gcc program.

 C++ GNU g++ used what fraction? used how many times more? 
Benchmark Time Memory Code
 k-nucleotide1/4±±
 spectral-norm±±±
 n-body±±±
 reverse-complement±1/2±
 pidigits±±±
 mandelbrot±±±
 binary-trees±±
 fannkuch-redux±±
 fasta±±±
 regex-dna1/21/4
 fasta-redux±
 C++ GNU g++ used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/41/2±±±

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

 Step 3 : Are the C++ GNU g++ 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 g++ program are shown for comparison against measurements of the fastest C GNU gcc program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 k-nucleotide 
C++ GNU g++12.133.65132,0523415  83% 81% 95% 76%
C GNU gcc40.9615.63153,6402280  95% 34% 100% 34%
 spectral-norm 
C++ GNU g++10.032.523881044  100% 100% 100% 100%
C GNU gcc10.252.583841139  100% 100% 100% 100%
 n-body 
C++ GNU g++20.1320.143201659  0% 0% 100% 0%
C GNU gcc20.4520.453201173  0% 0% 0% 100%
 reverse-complement 
C++ GNU g++1.250.86245,4562275  51% 15% 33% 49%
C GNU gcc1.170.86496,9361867  1% 25% 26% 88%
 pidigits 
C++ GNU g++2.762.761,452682  0% 0% 100% 0%
C GNU gcc2.752.761,124541  0% 0% 100% 0%
 mandelbrot 
C++ GNU g++23.745.9732,0961017  99% 99% 99% 100%
C GNU gcc23.335.8427,472799  100% 100% 100% 100%
 binary-trees 
C++ GNU g++17.075.78178,988892  90% 71% 77% 59%
C GNU gcc13.705.48100,232850  24% 74% 79% 74%
 fannkuch-redux 
C++ GNU g++61.4215.771,0201439  100% 97% 97% 96%
C GNU gcc52.8813.723281557  97% 91% 98% 100%
 fasta 
C++ GNU g++6.306.312881266  0% 0% 100% 0%
C GNU gcc4.924.922881221  0% 0% 0% 100%
 regex-dna 
C++ GNU g++6.004.45174,392695  33% 2% 100% 1%
C GNU gcc6.182.72286,6642579  65% 45% 48% 73%
 fasta-redux 
C++ GNU g++2.932.946161474  1% 0% 0% 100%
C GNU gcc1.681.692881321  0% 1% 99% 1%

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

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

Maybe one of those other C++ GNU g++ 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 g++ and C GNU gcc 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 g++ : c plus objects plus generics 

C++ 1991-2006, Bjarne Stroustrup (pdf)

gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

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

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

Revised BSD license

  Home   Conclusions   License   Help