My understanding is that *in theory* Rust should be really well suited for NRVO passes because of the borrow checker. In other langs there's guessing involved whether an optimization can be made because values may be "aliased". But in Rust the borrow checker *knows*!
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Is this due to ‘never’?
-
I'm don't know for sure, but I don't believe so? This mostly has to do with reasoning about how values are used on the stack, and whether intermediate copies can be removed. Though I don't know the exact mechanics behind it.
End of conversation
New conversation -
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.