4 ms·
Integer overflow checks are disabled by default in release builds, the author noted they were explicitly enabled in this project for additional safety. (This i
by hcs 7y ago
Integer overflow checks are disabled by default in release builds, the author noted they were explicitly enabled in this project for additional safety.
(This is just for the normal operators, if you use e.g. checked_add() or wrapping_add() then you can be explicit about what behavior you want.)
[edit: oops, the overflow checks were only enabled for a separate test, see note from the author below]
- emmericp 7y agoNo, we don't run with overflow checks by default; the overflow check performance analysis is a separate test.
- ridiculous_fish 7y agoIt's worth observing that signed integer overflow is undefined in C but defined in Rust, which can impose an additional cost. C: https://godbolt.org/z/CDha8- https://godbolt.org/z/CDha8- Rust: https://godbolt.org/z/DlN3uf https://godbolt.org/z/DlN3uf