Re:Rust Performance Pitfalls
by kibwen on Thursday June 08, 2017 @12:29PM
(#14515267)
Compiler backends don't particularly care about the user-defined variables in the source, since a typical compilation step is to convert to SSA form ( https://en.wikipedia.org/wiki/Static_single_assignment_form ). And it's relatively easy for a backend to remove allocations (or e.g. ignore the act of taking a reference) for variables that never get used. As long as the semantics are preserved, it's all good. The problem in this case is that removing implicitly that first call to collect might change the semantics of the program.
[ Parent
| on HN ]
There are no comments on this comment yet.