4 ms·
Rust aims to match C++ in performance.
by ehsanu1 13y ago
Rust aims to match C++ in performance.
- ksk 13y agoSomeone should add that to their FAQ then. https://github.com/mozilla/rust/wiki/Doc-project-FAQ https://github.com/mozilla/rust/wiki/Doc-project-FAQ This is what they state their goal is. (no mention of performance) >To design and implement a safe, concurrent, practical, static systems language. vs (linked article) >high productivity (ease of use, intuitive, high level) AND guaranteed (type)safety AND high execution performance.
- erickt 13y agoYou're right, we should mention it. Thanks for catching this. I filed a bug ticket to add some language about our performance goals: https://github.com/mozilla/rust/issues/11174 https://github.com/mozilla/rust/issues/11174
- kibwen 13y agoNuts to that, I expect that Rust could regularly exceed C++ in performance. Ownership as a core concept means that you get pointer aliasing information for free, which has always been Fortran's biggest advantage over C. And correct me if I'm wrong, but C++'s unique_ptr isn't guaranteed to have zero overhead at runtime, as Rust's unique pointers are.
- pcwalton 13y agounique_ptr should have similar performance to Rust as designed right now, but the upcoming changes to eliminate zeroing out of moved values should give Rust's unique pointers an edge over those of C++ in 1.0.