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
 regex-dna±1/21/4
 fasta± ±
 k-nucleotide±±±
 mandelbrot± ±
 pidigits± 
 binary-trees±±±
 fannkuch-redux± ±
 spectral-norm 
 reverse-complement †±
 n-body ±
 fasta-redux ±
 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
 regex-dna 
Rust3.001.82186,948669  64% 59% 23% 23%
C gcc5.812.45314,2002579  71% 52% 45% 71%
 fasta 
Rust4.611.5521,7081887  82% 72% 73% 73%
C gcc5.361.972,4721914  61% 34% 78% 99%
 k-nucleotide 
Rust24.849.44155,7962078  41% 41% 99% 84%
C gcc35.0511.64190,2242280  59% 96% 96% 53%
 mandelbrot 
Rust17.734.4963,460868  97% 99% 99% 100%
C gcc19.775.1332,240694  95% 96% 100% 96%
 pidigits 
Rust1.731.736,7841420  3% 0% 1% 100%
C gcc1.721.731,996448  2% 1% 1% 100%
 binary-trees 
Rust14.703.97120,968791  96% 92% 92% 94%
C gcc10.183.26160,856906  64% 76% 75% 99%
 fannkuch-redux 
Rust53.1813.458,1161191  100% 96% 100% 100%
C gcc35.659.101,516910  99% 96% 97% 100%
 spectral-norm 
Rust15.703.966,1041265  99% 99% 99% 99%
C gcc8.282.091,776569  100% 100% 100% 99%
 reverse-complement 
Rust1.331.13258,1321985  0% 83% 12% 24% †
C gcc0.750.49251,716741  33% 20% 31% 72% †
 n-body 
Rust23.9823.996,0721474  1% 0% 1% 100%
C gcc10.5010.509681490  100% 0% 1% 1%
 fasta-redux 
Rust3.973.986,1121747  1% 100% 1% 1%
C gcc1.571.576641321  2% 1% 100% 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