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

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 : Approximately - Are the Rust programs faster?

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±±±
 regex-dna±1/21/4
 fasta± ±
 mandelbrot± ±
 pidigits± 
 binary-trees±±±
 fannkuch-redux± ±
 reverse-complement±
 spectral-norm 
 fasta-redux ±
 n-body ±
 Rust used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±±±

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

 3 : Measurements - Are the Rust programs faster?

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.248.79155,5602078  81% 83% 60% 76%
C gcc36.5812.35131,9041535  37% 71% 95% 94%
 regex-dna 
Rust2.872.05174,524669  14% 62% 15% 54%
C gcc6.342.67290,7922579  96% 76% 84% 67%
 fasta 
Rust4.261.4723,6321887  70% 70% 70% 82%
C gcc5.291.812,3521914  89% 53% 54% 100%
 mandelbrot 
Rust20.845.2863,408868  99% 99% 98% 99%
C gcc22.405.6128,988799  100% 100% 100% 100%
 pidigits 
Rust2.492.506,7801420  0% 2% 0% 100%
C gcc2.492.502,140448  100% 0% 1% 0%
 binary-trees 
Rust13.593.5981,236791  96% 93% 93% 99%
C gcc9.682.97105,024906  93% 77% 87% 72%
 fannkuch-redux 
Rust49.3412.6012,1401191  100% 95% 99% 98%
C gcc39.4910.061,388910  99% 99% 95% 100%
 reverse-complement 
Rust1.381.17258,0521985  84% 14% 17% 12%
C gcc0.860.60251,368741  95% 84% 44% 15%
 spectral-norm 
Rust15.743.996,1241265  98% 99% 99% 99%
C gcc7.861.981,704569  99% 100% 99% 99%
 fasta-redux 
Rust3.683.686,0241747  100% 0% 1% 1%
C gcc1.591.596241402  100% 1% 1% 0%
 n-body 
Rust24.2624.265,9881474  1% 0% 0% 100%
C gcc10.3810.397361490  0% 100% 1% 1%

 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.2.0 (082e47636 2015-08-03)

Home Page: Rust a safe, concurrent, practical language

Revised BSD license

  Home   Conclusions   License   Play