Hacker News new | ask | show | jobs
by wicknicks 4667 days ago
I'm hoping for a not-that-far future ... Jokes apart, does Rust perform as well as C++?
1 comments

Anecdotally yes, within a few percent, depending on what you measure. Safe code tends not to perform as well as unsafe code, but this is also true in C++—most applications just tend to err (and I mean err) on the side of performance.
The difference is that in Rust you can write unsafe implementation of safe interface. In C++ you cannot specify safe interface. (You can and should document memory management assumptions in C++, but C++ compiler does not enforce such documentations.)