3 ms·
Sure, but that's not something you can rely on, is it?
by andrewflnr 9y ago
Sure, but that's not something you can rely on, is it?
- kibwen 9y agoIt's just an optimization, so obviously it's not guaranteed, but that doesn't mean it's random. And if it's in your hot loop and not being optimized away, benchmarking will find it easily. At the same time, array indexing in Rust is vanishingly rare IME... turns out I only ever used it for `for` loops, which are better served by iterators. :P