"Help, iterators made my Rust program slower!"

from blog ntietz.com blog - technically a blog, | ↗ original
↗ original
Recently in a programming community I belong to, someone presented a problem. They had a Rust program which was using threads and for loops. When they updated the code to use iterators, it got dramatically slower. Why did this happen? For a Rust veteran, the problem might not be surprising, but it trips up a lot of people because of how iterators...