News for hackers. Stuff that matters.
Re:Undefined behavior in C is a reading error by Asooka on Thursday May 20, 2021 @01:05PM (#27223859)
> I suspect so - makes it harder to reason about loop counts because the compiler can't necessarily guarantee that an incremented loop counter won't become negative and thus the loop needs to iterate more.

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

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%.
Re:Undefined behavior in C is a reading error by vyodaiken on Friday May 21, 2021 @09:36AM (#27233793)
link?
Re:Undefined behavior in C is a reading error by anarazel on Friday May 21, 2021 @03:44PM (#27238967)
Locally run benchmarks.