News for hackers. Stuff that matters.
Re:Rust – A hard decision pays off by lr1970 on Wednesday August 24, 2022 @05:21PM (#32585942)
> If I can avoid an index variable, I’m going to have less bugs since I won’t have to index.

Not only that. In safe Rust vector indexes are always bound-checked that slows execution a little bit. Iterators over a vector, on the other hand, do not suffer from bound-check overhead.

There are no comments on this comment yet.