296
Something something history is a flat circle
(lemmy.world)
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rust has monomorphisation like C++ and every function has the aliasing guarantees of restrict, a keyword rarely seen in C code bases use and C++ doesn't even support.
This means you can get more optimisations while writing in an intuitive style, where C/C++ requires some changes to the code.
On the other hand rustc has some hiccups with argument passing and rvo. One could argue that that's just the compiler while the aliasing problems are part of the language in the C/C++ case, but while there is only one rust compiler its performance is the languages performance.
For most use cases they are about equally fast.