News for hackers. Stuff that matters.
Re:Rust Performance Pitfalls by pcwalton on Thursday June 08, 2017 @02:05PM (#14515902)
It wouldn't help in most of these cases. It'd be too burdensome to require that map/filter/etc. take pure arguments. In the absence of that, the compiler is left with examining the specific function being called, which it can already do as a direct call as long as the body is visible (#[inline]). If the body is visible, LLVM will internally automatically mark the function as pure (readnone) if it is.

There are no comments on this comment yet.