4 ms·
It does, as well as overflow checks, you can re-enable everything to be safer with a custom build profile, but you'll loose at benchmarks
by WhereIsTheTruth 3y ago
It does, as well as overflow checks, you can re-enable everything to be safer with a custom build profile, but you'll loose at benchmarks
- steveklabnik 3y agoOverflow 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.