"Rust essentially never wastes cycles on bounds checking thanks to the design of its iterators."
Can you explain this or point me to the relevant documentation or code please?
Can you explain this or point me to the relevant documentation or code please?
The gist is that an iterator has enough information about the thing that it's iterating over that we, as library authors, can avoid unnecessary bounds checking and just perform unchecked indexing while retaining all the safety. LLVM is also surprisingly good at automatically vectorizing our iterators.