• 0 Posts
  • 41 Comments
Joined 2 years ago
cake
Cake day: July 24th, 2023

help-circle


  • 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.