Nice, but why isn't the LLVM optimizer removing the move?
Is it lack of proper alias analysis?
Sounds like that is a separate issue worth pursuing.

> The remaining, more difficult, issue is initialization of 
> aggregate data structures via constructor functions, which still 
> involves a bunch of moves, but I don't really see any way short of 
> macros to optimize that at the moment.

Wouldn't #[inline(always)] on the aggregate constructor fix that? (it's not 
great, but it's strictly better than a macro)

At any rate, shouldn't LLVM inlining heuristics catch that automatically as 
well?
If not, that sounds like another separate issue.

                                          
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to