Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Rust aims to match C++ in performance.


Nuts 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.


unique_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.


Someone should add that to their FAQ then.

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.


You'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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: