4 ms·
It’s also not as fast as C/C++ in all cases, only in some. http://benchmarksgame.alioth.debian.org/u64q/rust.html http://benchmarksgame.alioth.debian.org/u64q/
by tekknik 9y ago
It’s also not as fast as C/C++ in all cases, only in some.
http://benchmarksgame.alioth.debian.org/u64q/rust.html http://benchmarksgame.alioth.debian.org/u64q/rust.html
- steveklabnik 9y agoThe biggest differences there are due to lack of SIMD. We expect it to be stable quite soon, and that should close the gap quite a bit.
- igouy 9y agoDo you say that because you have coded those programs using SIMD and rustc nightly, and seen that using SIMD eliminates the performance difference ?
- steveklabnik 9y agoI have not personally done this, but the people who have identified that as the issue, and what we’re stabilizing is the exact same thing as what C and C++ compilers have, so there’s no reason to believe it would be different. Once it’s stable, we’ll all see!
- igouy 9y agoSomeone has repeatedly commented on /r/rust/ that differences are due not so much to SIMD but iirc to not triggering the same LLVM loop unrolling.
- steveklabnik 9y agoI think you're confusing loop unrolling and autovectorization. That said, it's kinda moot, once SIMD is stable, we'll find out :)
- igouy 9y ago>> I think you're confusing loop unrolling and autovectorization. << Here's exactly what I was told -- "This was achieved by manually unrolling a 10-step loop, which compiler apparently could not optimize."
- irundebian 9y agoI would say C will never be as safe as Rust. Just accept it, C is crap. It's just not cool.