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±±
 pidigits± 
 spectral-norm± 
 binary-trees±±±
 mandelbrot± 
 fannkuch-redux ±
 n-body ±
 fasta † 1/2
 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 : 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 
Rust25.739.65154,6522118  45% 43% 98% 83%
C gcc35.0911.37188,4962280  64% 91% 61% 94%
 reverse-complement 
Rust0.750.48255,0721896  33% 44% 59% 22%
C gcc0.770.51250,784741  21% 18% 74% 43%
 pidigits 
Rust1.731.735,4681326  1% 2% 0% 100%
C gcc1.731.73932448  1% 1% 3% 100%
 spectral-norm 
Rust7.892.045,028898  97% 97% 98% 98%
C gcc7.891.98752569  99% 99% 100% 100%
 binary-trees 
Rust13.423.55130,164827  94% 95% 96% 94%
C gcc10.373.33155,504906  79% 62% 74% 99%
 mandelbrot 
Rust21.375.4852,9441323  98% 97% 97% 100%
C gcc19.445.0231,928694  96% 96% 100% 96%
 fannkuch-redux 
Rust59.5115.106,9641191  98% 100% 99% 97%
C gcc34.618.854,520910  99% 98% 100% 94%
 n-body 
Rust24.6324.644,9641547  0% 1% 100% 1%
C gcc10.1910.194361490  0% 1% 1% 100%
 fasta 
Rust5.055.054,9601244  1% 0% 1% 100% †
C gcc5.721.945,0401914  89% 99% 63% 47% †
 fasta-redux 
No program
C gcc0.020.02?1402  0% 0% 0% 100%
 regex-dna 
RustMake Error
C gcc0.060.10?2579  30% 10% 50% 45%

 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