/mobile Handheld Friendly website

vs

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

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

(Memory use is only compared for tasks that require memory to be allocated.)


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 gcc programs faster? Approximately.

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

(Memory use is only compared for tasks that require memory to be allocated.)

 C gcc used what fraction? used how many times more? 
Benchmark Time Memory Code
 pidigits1/7 1/2
 fannkuch-redux1/3 
 mandelbrot1/3 ±
 n-body1/3 ±
 spectral-norm1/2 ±
 reverse-complement1/2±±
 fasta± ±
 k-nucleotide±±±
 binary-trees±±
 C gcc used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/71/71/31/2±

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

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

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 pidigits 
C gcc1.731.73944448  0% 1% 2% 100%
Rust12.4812.491,708677  0% 1% 0% 100%
 fannkuch-redux 
C gcc22.7022.704041183  0% 1% 1% 100%
Rust77.4877.50780601  0% 0% 1% 100%
 mandelbrot 
C gcc19.3619.3630,520694  1% 0% 0% 100%
Rust52.2352.24780633  0% 1% 0% 100%
 n-body 
C gcc10.1810.184361490  0% 1% 0% 100%
Rust25.6925.707801295  0% 0% 1% 100%
 spectral-norm 
C gcc7.857.85752569  0% 0% 1% 100%
Rust15.9515.962,288835  0% 1% 1% 100%
 reverse-complement 
C gcc0.710.71248,720741  4% 7% 1% 99%
Rust1.361.37248,980804  0% 4% 1% 100%
 fasta 
C gcc6.016.013761221  0% 0% 1% 100%
Rust4.664.667801283  0% 1% 1% 100%
 k-nucleotide 
C gcc41.1341.16180,1482280  0% 1% 1% 100%
Rust28.3828.40129,3322049  0% 0% 1% 100%
 binary-trees 
C gcc36.7036.72131,672706  0% 0% 1% 100%
Rust17.9117.95180,456779  0% 0% 1% 100%
 fasta-redux 
C gcc0.030.03?1321  0% 0% 0% 100%
No program
 regex-dna 
C gcc0.050.17?2579  0% 0% 6% 94%
No program

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

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

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

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest C gcc and Rust 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 gcc : unchecked low-level programming 

gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu8)

Online book: The C Book

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

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

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

Revised BSD license

  Home   Conclusions   License   Play