News for hackers. Stuff that matters.
Re:How expensive is integer-overflow trapping in C++? by djrenren on Thursday September 24, 2020 @02:28AM (#24575859)
I dont think Rust traps on overflow in release builds
Re:How expensive is integer-overflow trapping in C++? by carlmr on Thursday September 24, 2020 @02:30AM (#24575877)
That's correct, it's not a zero-cost abstraction.

Also the wrapping types aren't unsafe, they just make it explicit.

Re:How expensive is integer-overflow trapping in C++? by fluffy87 on Thursday September 24, 2020 @07:14AM (#24577423)
. In release mode, the behavior of integer overflow in Rust is modulo two arithmetic instead of not UB/cannot happen.

These two are not the same thing. See my reply to masklin.