/mobile Handheld Friendly website

vs

 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++ g++ 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++ g++ 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
 binary-trees±±±
 fasta± ±
 reverse-complement †±1/3
 n-body ±
 fannkuch-redux 1/2
 k-nucleotide †±
 spectral-norm ±
 mandelbrot †17× 1/2
 pidigits24× ±
 Rust used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±14×24×

† 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++ g++ program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 binary-trees 
Rust15.654.3790,028779  92% 84% 90% 94%
C++ g++12.244.0988,368919  70% 69% 95% 62%
 fasta 
Rust4.714.726761283  1% 0% 0% 100%
C++ g++4.224.238841286  1% 0% 0% 100%
 reverse-complement 
Rust1.331.33248,880804  0% 0% 100% 0% †
C++ g++1.220.84245,4562275  29% 33% 49% 35% †
 n-body 
Rust27.7227.736721295  1% 0% 0% 100%
C++ g++9.089.083441545  1% 0% 0% 100%
 fannkuch-redux 
Rust93.6493.67676601  0% 1% 1% 100%
C++ g++27.2827.302961150  1% 1% 1% 100%
 k-nucleotide 
Rust30.3730.39126,6962049  1% 0% 100% 0% †
C++ g++23.317.26137,2161252  74% 97% 76% 75% †
 spectral-norm 
Rust37.2912.831,732835  74% 73% 72% 73%
C++ g++7.962.009361044  100% 100% 100% 100%
 mandelbrot 
Rust101.23101.26672633  1% 0% 0% 100% †
C++ g++23.475.9032,0881017  99% 99% 99% 100% †
 pidigits 
Rust63.7563.781,676677  0% 1% 1% 100%
C++ g++2.682.681,464682  1% 0% 2% 100%
 regex-dna 
No program
C++ g++0.070.05?695  80% 0% 67% 17%
 fasta-redux 
No program
C++ g++0.030.03?1474  0% 0% 100% 0%

† 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++ g++ 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++ g++ 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 0.10 (46867cc 2014-04-02 16:59:39 -0700)
host: i686-unknown-linux-gnu

Home Page: Rust a safe, concurrent, practical language

Revised BSD license

  Home   Conclusions   License   Play