Hacker News new | ask | show | jobs
by galangalalgol 1118 days ago
In rust I've noticed using iterators instead of for loops tends to trigger auto vectorization more often.
1 comments

In Rust using iterators is almost always better than for loops. The compiler is virtually guaranteed to optimize out bounds checks vs indexing in.