4 ms·
As I understand it, there are a number of potential optimizations based on Rust's implicit understanding of the lifetime of a memory region. LLVM doesn't know a
by dikaiosune 11y ago
As I understand it, there are a number of potential optimizations based on Rust's implicit understanding of the lifetime of a memory region. LLVM doesn't know about those because they can't be represented in the IR. Last I heard, any kind of optimization work based on the extra information rustc has is waiting for the compiler refactor that's currently underway.
- pcwalton 11y agoNote that there aren't any optimizations that C++ can do that Rust can't in this area.
- santaclaus 11y agoCan Rust's aliasing rules lead to extra avenues of optimization compared C++ (along the lines of C vs. Fortran)?
- pcwalton 11y agoQuite possibly yes.