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

† 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
 fasta 
Rust4.654.657801283  0% 0% 1% 100%
C++ g++4.234.231,0721286  1% 95% 1% 5%
 binary-trees 
Rust20.865.78180,184779  83% 99% 92% 89%
C++ g++15.294.73132,668919  94% 86% 87% 59%
 reverse-complement 
Rust1.361.37248,980804  1% 100% 1% 1% †
C++ g++1.020.65247,5082275  17% 64% 34% 48% †
 n-body 
Rust25.6925.707801295  0% 0% 1% 100%
C++ g++9.359.354321544  98% 1% 3% 1%
 fannkuch-redux 
Rust77.4877.50780601  0% 0% 1% 100%
C++ g++22.6922.703601150  1% 0% 1% 100%
 spectral-norm 
Rust25.959.572,500835  69% 68% 70% 69%
C++ g++10.092.544961044  99% 99% 100% 100%
 k-nucleotide 
Rust28.4128.44129,3322049  1% 1% 0% 100% †
C++ g++24.797.34154,7841252  81% 80% 81% 97% †
 pidigits 
Rust12.4912.501,620677  1% 100% 0% 0%
C++ g++2.292.301,656682  1% 0% 0% 100%
 mandelbrot 
Rust52.2252.23780633  1% 100% 0% 0% †
C++ g++23.775.9732,3881017  100% 100% 100% 100% †
 regex-dna 
No program
C++ g++0.070.09?695  0% 10% 44% 70%
 fasta-redux 
No program
C++ g++0.030.03?1474  0% 0% 100% 25%

† 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: x86_64-unknown-linux-gnu

Home Page: Rust a safe, concurrent, practical language

Revised BSD license

  Home   Conclusions   License   Play