A basic version of Named Return Value Optimization (NRVO) landed in rustc last week! https://github.com/rust-lang/rust/pull/72205 … This is exciting for Rust because it's an optimization that's common in C++ that Rustc didn't know how to do yet. But now it does in some cases!
-
-
Yeah! In the past, we did sometimes get NRVO if LLVM picked up on it, this implements it at a MIR level, which means if Rust thinks it makes sense, it'll always happen! I know
@sheevink is also looking at a more complex version of this as well which reaches even further IIRCThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.