Re:How Rust 1.26 more than tripled the speed of my code
by steveklabnik on Monday May 14, 2018 @03:48PM
(#17068830)
> I believe that is technically subject to change
Yes, that's correct.
Yes, that's correct.
Unsigned and signed overflow in rust are both well defined to do one of two things, panic or wrap. If debug assertions are enabled they are defined to panic. In practice if debug assertions are not enabled they will wrap, but I believe that is technically subject to change (into a panic). It will realistically only change if the hardware gets much better at catching overflows quickly.
A panic is usually like a exception that you are really not expected to ever catch except at thread boundaries. You can turn them into a immediate process exit with a compiler flag.