
Performance
Bounds Checks in Rust and When the Optimizer Removes Them
Every v[i] checks the index. In many loops the optimizer proves the check unnecessary and removes it. Learn when that happens, how to help it and why unchecked indexing is rarely worth it.
3 min read