Re:Undefined behavior in C is a reading error
by anarazel on Thursday May 20, 2021 @01:12PM
(#27223954)
Postgres compiles with fwrapv for many years now, and yes, it does introduce a measurable CPU overhead. Not 10%, but also not just 0.1%.
This is a favourite example that gets thrown around, but for all practical loops GCC and clang seem to have no problem even when you compile with -fwrapv