Rust is now overall faster than C in benchmarks
11–20 of 445 posts
Re: Rust is now overall faster than C in benchmarks
#12I think benchmarking C vs C++ vs Rust must only really be useful for researchers. They’re all making a similar tradeoff for performance: forcing you to consider how you use memory. Does anyone work in a field where the performance difference between these specific three platforms matters? I’m genuinely curious. Edit: also, if you could explain briefly why and what makes particular choices out of the three unsuitable,…
Re: Rust is now overall faster than C in benchmarks
#13Re: Rust is now overall faster than C in benchmarks
#14When 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
#15I think benchmarking C vs C++ vs Rust must only really be useful for researchers. They’re all making a similar tradeoff for performance: forcing you to consider how you use memory. Does anyone work in a field where the performance difference between these specific three platforms matters? I’m genuinely curious. Edit: also, if you could explain briefly why and what makes particular choices out of the three unsuitable,…
Yeah, databases
Re: Rust is now overall faster than C in benchmarks
#16One 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…
Re: Rust is now overall faster than C in benchmarks
#17I think benchmarking C vs C++ vs Rust must only really be useful for researchers. They’re all making a similar tradeoff for performance: forcing you to consider how you use memory. Does anyone work in a field where the performance difference between these specific three platforms matters? I’m genuinely curious. Edit: also, if you could explain briefly why and what makes particular choices out of the three unsuitable,…
Re: Rust is now overall faster than C in benchmarks
#18I think benchmarking C vs C++ vs Rust must only really be useful for researchers. They’re all making a similar tradeoff for performance: forcing you to consider how you use memory. Does anyone work in a field where the performance difference between these specific three platforms matters? I’m genuinely curious. Edit: also, if you could explain briefly why and what makes particular choices out of the three unsuitable,…
(*) of course part of the output is also looking at the Rust code and evaluating style and `unsafe`-wise what the price for winning was.
Re: Rust is now overall faster than C in benchmarks
#19Shouldnt they be about the same? (At least until the LLVM immutability optimizations happen) I suspect surprising factors are in play.
For instance, in real-world usage, you might do a bit more redundant copying in C in places you would avoid it with the borrow checker in Rust.
Conversely, enforcing RAII in Rust might cost performance in some scenarios relative to C.