Re:C and C++ Prioritize Performance over Correctness
by eklitzke on Friday August 18, 2023 @03:29PM
(#37180858)
You can compile code with -fwrapv and for most programs the overhead is minimal (the exception being that if you're writing number crunching code, the overhead is going to be huge). For my personal projects I have -fwrapv as part of the default compiler flags, and I remove the flag in opt builds. I honestly haven't caught that many bugs using it, but for the few bugs it did catch it saved me a lot of debugging time.
[ Parent
| on HN ]
There are no comments on this comment yet.