1 : Are the Rust programs faster? At a glance.

Each chart bar shows, for one unidentified benchmark, how much the fastest Rust program used compared to the fastest C gcc 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 Rust programs faster? Approximately.

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

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

 Rust used what fraction? used how many times more? 
Benchmark Time Memory Code
 k-nucleotide±±±
 reverse-complement±±
 mandelbrot± 
 pidigits± 
 spectral-norm± 
 binary-trees±±±
 fannkuch-redux± ±
 n-body ±
 fasta † 1/2
 Rust used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±±±±

† possible mismatch - one-core program compared to multi-core program.

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

 3 : Are the Rust 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 Rust 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 
Rust26.508.74154,5162118  79% 78% 85% 63%
C gcc35.8912.38130,7561535  94% 63% 91% 43%
 reverse-complement 
Rust0.740.53257,0321896  2% 28% 63% 51%
C gcc0.840.58250,384741  14% 76% 21% 41%
 mandelbrot 
Rust20.255.1835,5441323  97% 97% 97% 100%
C gcc22.615.6728,464799  100% 100% 100% 100%
 pidigits 
Rust2.492.495,3561326  0% 0% 2% 100%
C gcc2.492.49856448  3% 100% 1% 0%
 spectral-norm 
Rust7.922.094,936898  95% 94% 95% 96%
C gcc7.901.99644569  100% 100% 100% 100%
 binary-trees 
Rust12.063.1987,208827  93% 96% 99% 93%
C gcc9.742.85103,700906  76% 76% 100% 93%
 fannkuch-redux 
Rust52.0613.2910,9321191  99% 98% 100% 95%
C gcc38.269.75340910  100% 99% 99% 95%
 n-body 
Rust24.6224.624,8401547  1% 0% 0% 100%
C gcc9.919.923361490  0% 0% 1% 100%
 fasta 
Rust5.005.014,8441244  2% 2% 2% 100% †
C gcc5.221.801,3841914  96% 89% 99% 9% †
 fasta-redux 
No program
C gcc0.020.03?1402  0% 0% 0% 100%
 regex-dna 
RustMake Error
C gcc0.060.10?2579  73% 10% 18% 40%

† possible mismatch - one-core program compared to multi-core program.

 4 : Are there other Rust programs for these benchmarks?

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

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

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Rust 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.

 Rust : large-system integrity availability and concurrency 

rustc 1.0.0-alpha.2 (522d09dfe 2015-02-19) (built 2015-02-19)

Home Page: Rust a safe, concurrent, practical language

Revised BSD license

  Home   Conclusions   License   Play