5 ms·
I'm hoping for a not-that-far future ... Jokes apart, does Rust perform as well as C++?
by wicknicks 13y ago
I'm hoping for a not-that-far future ... Jokes apart, does Rust perform as well as C++?
- evincarofautumn 13y agoAnecdotally 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.
- sanxiyn 13y agoThe 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.)