4 ms·
In rust I've noticed using iterators instead of for loops tends to trigger auto vectorization more often.
by galangalalgol 3y ago
In rust I've noticed using iterators instead of for loops tends to trigger auto vectorization more often.
- Veliladon 3y agoIn Rust using iterators is almost always better than for loops. The compiler is virtually guaranteed to optimize out bounds checks vs indexing in.