3 ms·
I think modern C++ compilers are smart enough to eliminate the bounds check if they can prove that it never fails.
by majewsky 8y ago
I think modern C++ compilers are smart enough to eliminate the bounds check if they can prove that it never fails.
- steveklabnik 8y agoYup, Rust will too.
- saghm 8y agoI mainly do it this way to reduce the chance of my code panicking, not specifically for any performance reasons.