News for hackers. Stuff that matters.
Re:Rust Priorities after 1.0 by captaincrowbar on Friday April 17, 2015 @12:09AM (#9392215)
"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?

Re:Rust Priorities after 1.0 by kibwen on Friday April 17, 2015 @12:29AM (#9392268)
The documentation on iterators describes the advantages of using iteration rather than direct indexing in a loop: http://doc.rust-lang.org/nightly/book/iterators.html

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.

Re:Rust Priorities after 1.0 by captaincrowbar on Friday April 17, 2015 @07:21PM (#9397738)
Thanks!