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 †±±±
 fasta ±
 fannkuch-redux ±
 n-body ±
 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 
Rust27.4527.47148,3762118  0% 1% 1% 100%
C gcc35.2235.23126,7881535  0% 2% 1% 100%
 reverse-complement 
Rust0.600.61257,0041896  0% 2% 2% 100%
C gcc0.740.75250,408741  1% 1% 0% 100%
 mandelbrot 
Rust20.2220.2338,1401323  0% 1% 1% 100%
C gcc22.5922.6030,848799  1% 0% 1% 100%
 pidigits 
Rust2.492.495,3601326  0% 0% 1% 100%
C gcc2.492.49856448  0% 1% 0% 100%
 spectral-norm 
Rust7.907.914,904898  0% 1% 1% 100%
C gcc7.857.85644569  0% 0% 1% 100%
 binary-trees 
Rust11.7711.7879,264827  2% 1% 1% 100% †
C gcc9.399.4099,424906  0% 72% 34% 100% †
 fasta 
Rust5.005.004,8441244  1% 0% 0% 100%
C gcc3.293.292841261  0% 1% 1% 100%
 fannkuch-redux 
Rust52.0852.106,8401191  1% 0% 1% 100%
C gcc27.2627.273161183  0% 0% 1% 100%
 n-body 
Rust24.6124.624,8441547  1% 0% 1% 100%
C gcc9.919.923361490  0% 1% 1% 100%
 regex-dna 
RustMake Error
C gcc0.050.07?2579  0% 0% 0% 100%
 fasta-redux 
No program
C gcc0.020.03?1402  0% 0% 0% 100%

† 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