LLVM is great, and it&#x27;s the reason why Rust is able to match C++ in performance on this workload, but it&#x27;s not a magic-optimizer-of-everything: it&#x27;s tuned to C and C++. We have added a couple of Rust-specific optimizations to it, but not a whole lot.<p>I suspect what the author was seeing was random performance differentials between iterators and loops, which often boils down to little missed optimizations in LLVM. If you find them, please file them in the Rust bug tracker--we&#x27;ve fixed many of them and will continue to do so in the future!<p>Note that when MIR lands, progress on which is well underway, we&#x27;ll have the ability to do optimizations at the Rust IR level in addition to the LLVM level. This should make it easier to do these kinds of things.