Signed overflow checks are typically not free unfortunately they have a cost of about 5% or thereabouts
In hot paths it can be even more. This is why even Rust defines it as wrapping but elides the overflow panic in release builds.
In hot paths it can be even more. This is why even Rust defines it as wrapping but elides the overflow panic in release builds.