2 ms·
> But integer arithmetic is safe in terms of Rust. To expand on this: integer overflow is not UB, it is unspecified. It can result in clamping, wrapping or a p
by estebank 3y ago
> But integer arithmetic is safe in terms of Rust.
To expand on this: integer overflow is not UB, it is unspecified. It can result in clamping, wrapping or a panic, depending on configuration at compile time.
> In release mode, it uses modular arithmetic.
And I believe that to have been a mistake. Android enables overflow checks by default and there is no measurable performance impact.