3 ms·
"Rust essentially never wastes cycles on bounds checking thanks to the design of its iterators. The Servo team tells me that bounds checking has never shown up
by danieldk 12y ago
"Rust essentially never wastes cycles on bounds checking thanks to the design of its iterators. The Servo team tells me that bounds checking has never shown up in any performance profiles."
Source: https://news.ycombinator.com/item?id=9392131 https://news.ycombinator.com/item?id=9392131
- dbaupp 12y agoThat's... not exactly relevant. :) Rust's iterators definitely resolve a lot of problems one might have with bounds checking, but there's still times when one is essentially required to do explicit indexing (e.g. iterating down a column of a multidimensional array) but in such a way that the bounds checks should be removable. My point was that, modulo bugs, rustc (more specifically, LLVM) will eliminate such bounds checks. With or without iterators.
- Animats 12y agoI really need to write a matrix multiply and see what code Rust generates.