Remix.run Logo
fithisux 5 days ago

"Rust shines in new projects where safety is the priority, while C++ continues to dominate legacy systems and performance-critical domains."

the truth

MBCook 5 days ago | parent | next [-]

Hasn’t Rust been shown to be very fast, especially since it can elide a lot of safety checks that would otherwise be necessary to prevent bugs?

On legacy code bases, sure. C++ rules in legacy C++ codebases. That’s kind of a given isn’t it? So that’s not a benefit. Just a fact.

charlieflowers 5 days ago | parent | prev [-]

> "while C++ continues to dominate ... performance-critical domains"

Why performance-critical domains? Does C++ have a performance edge over Rust?

fithisux 5 days ago | parent [-]

That is what the article says.

tialaramex 4 days ago | parent | next [-]

But you stated it was "the truth" and so we might reasonably wonder why you think so, unless it's that you just believe anything you read.

"ABI: Now or never" by Titus Winters addresses some perf leaks C++ had years ago, which it can't fix (if it retains its ABI promise). They're not big but they accumulate over time and the whole point of that document was to explain what the price is if (unlike Rust) you refuse to take steps to address it.

Rust has some places where it can't match C++ perf, but unlike that previous set Rust isn't obliged to keep one hand tied behind its back. So this gently tips the scales further towards Rust over time.

Worse, attempts to improve C++ safety often make its performance worse. There is no equivalent activity in Rust, they already have safety. So these can heap more perf woes on a C++ codebase over time.

Klonoar 4 days ago | parent | prev | next [-]

The article is not an authority, so if you’re going to appeal to it when someone presses you on the topic, you should probably be ready to back it up.

charlieflowers 4 days ago | parent | prev [-]

It seems you agree? I'd love to hear your thoughts on it. I had gotten the impression (second-hand) that they were roughly equally matched in this regard.