logoalt Hacker News

saagarjhatoday at 11:20 AM1 replyview on HN

Signed overflow checks are typically not free unfortunately they have a cost of about 5% or thereabouts


Replies

vlovich123today at 12:50 PM

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.

show 1 reply