4 ms·
Overflow checks turn into two's compliments' wrapping, but that's only considered acceptable because bounds checks are not turned off. https://play.rust-lang.o
by steveklabnik 3y ago
Overflow checks turn into two's compliments' wrapping, but that's only considered acceptable because bounds checks are not turned off.
https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=f077ed9ee71c0d1a212ec49c24a576cf https://play.rust-lang.org/?version=stable&mode=release&edit...
EDIT: I wonder if you're thinking about how sometimes bounds checks are optimized away? It is true that that will happen in release mode more than debug mode, but those are only the checks that can be proven redundant, if there is any doubt, they will not be optimized out. Semantically, they are still there.