Maybe I should give up and try Rust. Does Rust give you _maximum_ control over performance the way C and C++ do? I need that and that's I why I used C++ in the first place.
Maybe I should give up and try Rust. Does Rust give you _maximum_ control over performance the way C and C++ do? I need that and that's I why I used C++ in the first place.
Yes, with a small asterisk. In general, this is true. In practice, with the way optimizations go, sometimes one or the other may be faster. Or people playing with definitions. But the answer to your question in spirit is "yes."
In general yes.
What do you mean, exactly?
Rust doesn't have hidden things going on in your programs--and the culture is very much "if it's slow it should be visible in the source code".
I had some Swift code a while back. It was optimized, but when I rewrote it in C++ it got a lot faster. Something bad was happening that wasn't "visible in the code", as you said. The code was pretty complex algorithm and data structure stuff related to computational geometry and computer graphics. I suspect if I tried it in Rust I'd be fighting with the borrow checker and that is not appealing.
I suspect Visual Studio on Windows works better than what I've been using – VS Code or Emacs with clangd, which sometimes runs amok, takes 20GB of RAM, and kills my laptop.