Rust is now overall faster than C in benchmarks
benchmarksgame-team.pages.debian.net
Rust is now overall faster than C in benchmarks
1–10 of 445 posts
Re: Rust is now overall faster than C in benchmarks
#2I was wondering if perhaps this was actually measuring a difference between LLVM and GCC, but they also provide a set of benchmarks of C Clang vs C GCC (1) and Clang is generally slower in those test. Although there is some correlation between the ones Clang wins in C And Rust.
1. https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
Re: Rust is now overall faster than C in benchmarks
#3Interestingly, C++ seems to be the fastest overall.
Re: Rust is now overall faster than C in benchmarks
#4Searched the page for "Rust" which returned nothing... and the box labels are awkward. Why not label them conventionally?
Re: Rust is now overall faster than C in benchmarks
#5Interestingly, C++ seems to be the fastest overall.
After the rust blossom storm I didn't track cpp implementation evolutions.. did cpp compiler perf/libs increased or was is simply faster and still is the same ?
Re: Rust is now overall faster than C in benchmarks
#6Rust seems to be using parallelism better. In one benchmark though (fasta), C gcc is using all 4 cpus and Rust only two, and still wins.
(Looking at just C gcc vs Rust) https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
Re: Rust is now overall faster than C in benchmarks
#7Shouldnt they be about the same? (At least until the LLVM immutability optimizations happen)
I suspect surprising factors are in play.
Re: Rust is now overall faster than C in benchmarks
#8When Rust is faster than C in a benchmark in which C++ is also faster than C, I know I can safely ignore such benchmark.
Re: Rust is now overall faster than C in benchmarks
#9The fastest n-body program is written in very idiomatic rust. https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
Re: Rust is now overall faster than C in benchmarks
#10One of Rust's performance advantages is the compiler's ability to unambiguously determine memory aliasing. Aliasing is why many numeric kernels are written in Fortran, a much older language that also enforces strict aliasing as it simply doesn't allow overlapping references.
There are probably others as well, but this is the advantage I'm familiar with. C's ambiguity makes it harder to achieve some optimizations that can really matter on modern CPUs.