/mobile Handheld Friendly website

÷

 1 : Are the C++ g++ programs faster? At a glance.

Each chart bar shows, for one unidentified benchmark, how much the fastest C++ g++ program used compared to the fastest C gcc program.


These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. These are just 10 tiny examples.

 2 : Are the C++ g++ programs faster? Approximately.

Each table row shows, for one named benchmark, how much the fastest C++ g++ program used compared to the fastest C gcc program.

 C++ g++ used what fraction? used how many times more? 
Benchmark Time Memory Code
 k-nucleotide1/2±1/2
 fasta±±
 mandelbrot±±±
 fannkuch-redux±±
 fasta-redux±±
 n-body±±
 spectral-norm±1/2
 pidigits±
 reverse-complement±±
 regex-dna1/21/4
 binary-trees±
 C++ g++ 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.

 3 : Are the C++ g++ programs faster? Measurements.

These are not the only tasks that could be solved. These are just 10 tiny examples. These are not the only compilers and interpreters. These are not the only programs that could be written.

For each named benchmark, measurements of the fastest C++ g++ program are shown for comparison against measurements of the fastest C gcc program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 k-nucleotide 
C++ g++25.897.79155,9161252  78% 80% 78% 98%
C gcc44.6416.00180,3802280  35% 50% 98% 97%
 fasta 
C++ g++4.164.161,0721286  0% 0% 100% 0%
C gcc5.965.973721221  0% 0% 0% 100%
 mandelbrot 
C++ g++19.295.0132,288726  95% 99% 96% 95%
C gcc23.525.8925,976879  100% 100% 100% 100%
 fannkuch-redux 
C++ g++47.9512.291,2361440  100% 93% 100% 98%
C gcc48.3812.424121557  98% 93% 98% 100%
 fasta-redux 
C++ g++1.701.718321474  0% 0% 1% 100%
C gcc1.601.613721321  0% 0% 99% 1%
 n-body 
C++ g++10.0710.078281763  0% 0% 1% 100%
C gcc9.339.344321490  100% 0% 0% 1%
 spectral-norm 
C++ g++10.022.524921044  100% 100% 100% 100%
C gcc7.871.98748569  99% 99% 99% 100%
 pidigits 
C++ g++2.292.301,648682  0% 0% 0% 100%
C gcc1.721.73936448  0% 0% 1% 100%
 reverse-complement 
C++ g++1.220.77245,6922275  12% 55% 49% 46%
C gcc0.800.56248,716741  16% 20% 44% 73%
 regex-dna 
C++ g++5.834.10173,632695  0% 60% 82% 0%
C gcc5.762.50292,1282579  69% 68% 49% 46%
 binary-trees 
C++ g++32.349.25360,404892  89% 79% 95% 88%
C gcc15.714.79155,788850  93% 67% 78% 94%

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

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

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

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest C++ g++ and C 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++ g++ : c plus objects plus generics 

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

Online book: Looking for 4x speedups? SSE to the rescue! pdf slides

gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3

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

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

Revised BSD license

  Home   Conclusions   License   Play