Re:Why is Rust slightly slower than C?
by codesushi42 on Thursday September 12, 2019 @09:28PM
(#20958270)
Quotes about Chromium and Firefox are likewise obsolete
Yeah, because neither of those teams had any idea what they were doing, obviously. Even with C++ 11 at their disposal. But somehow, interestingly enough, you do.
Neither uses RAII, so they pay a 20-30% runtime penalty
Who knows where you pulled that number from.
I guess then, according to you at least, there are no performance penalties to be paid for any C++ language features. Please, continue to impart your knowledge and unreferenced benchmark tests on us all.
But moving can pessimize string-passing and -returning. Just write the code in the clearest way possible, and optimize hot paths where it turns out to matter, according to measurements. People have been demonstrated to be very poor at picking which those are, a priori.