Practice
Learn
← Quit
0 / 0 correct
Rust
Hard
1 of 40
Why are bounds checks a performance concern, and how are they usually avoided safely?
A
They don't affect performance
B
They can only be avoided with unsafe get_unchecked
C
Each v[i] checks i < len; iterators, slice patterns or asserting lengths upfront let the compiler drop checks
D
Bounds checks only exist in debug builds