2 ms·
I believe that in release mode Rust will remove bounds checks.
by rocqua 3y ago
I believe that in release mode Rust will remove bounds checks.
- josephg 3y agoNo, this is not true. Rust removes integer overflow checks in release mode, but it keeps array bounds checks. You can see this pretty easily in compiler explorer. This is a simple array lookup compiled in release mode: https://rust.godbolt.org/z/dhz34KEvj https://rust.godbolt.org/z/dhz34KEvj