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± 
 fannkuch-redux± ±
 binary-trees±±±
 n-body ±
 fasta † 1/2
 regex-dna10×±1/3
 Rust used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±±±10×

† 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 
Rust28.789.44154,4922097  80% 64% 100% 63%
C gcc35.8912.38130,7561535  94% 63% 91% 43%
 reverse-complement 
Rust0.740.53259,0521986  0% 27% 63% 54%
C gcc0.840.58250,384741  14% 76% 21% 41%
 mandelbrot 
Rust20.295.1635,7201309  98% 98% 100% 99%
C gcc22.615.6728,464799  100% 100% 100% 100%
 pidigits 
Rust2.492.495,3561292  3% 0% 100% 1%
C gcc2.492.49856448  3% 100% 1% 0%
 spectral-norm 
Rust7.912.074,9441143  96% 96% 96% 96%
C gcc7.901.99644569  100% 100% 100% 100%
 fannkuch-redux 
Rust47.1812.0510,9361162  99% 96% 100% 98%
C gcc38.269.75340910  100% 99% 99% 95%
 binary-trees 
Rust15.864.17137,936730  95% 94% 93% 99%
C gcc9.742.85103,700906  76% 76% 100% 93%
 n-body 
Rust24.5424.554,8481500  1% 0% 100% 1%
C gcc9.919.923361490  0% 0% 1% 100%
 fasta 
Rust4.974.974,8441214  0% 0% 1% 100% †
C gcc5.221.801,3841914  96% 89% 99% 9% †
 regex-dna 
Rust82.5626.57222,160748  70% 71% 97% 74%
C gcc6.202.59287,9002579  46% 70% 51% 74%
 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 (44a287e6e 2015-01-08 17:03:40 -0800)

Home Page: Rust a safe, concurrent, practical language

Revised BSD license

  Home   Conclusions   License   Play