Hacker News new | ask | show | jobs
by jmull 290 days ago
This isn't a C++ vs. Rust thing.

If you care about performance, you measure it. If you don't measure performance, you don't care about it.

2 comments

Problem is there is a huge number of pitfalls when measuring performance.

You have to do it correct or you might be just measuring: when your system is pulling updates, how big is your username, the performance of the least critical thing in your app.

And at worst you can speed up your least performing function only to yield a major slowdown to overall performance.

That's a fair observation about performance, but I think this goes to correctness too. For some types copying them affects the program correctness, and so in C++ you're more likely to write an incorrect program as a result of this choice.