AFAIK, Rust benefits from the same optimizations that Clang can. In some areas Rust can actually benefit more from better aliasing information. But you do have to use the keyword unsafe for some things that you can Just Do in C++. You're right it can be difficult to achieve hand-optimized C++ levels of performance with Safe Rust.