News for hackers. Stuff that matters.
Re:Fast integer overflow detection (2012) by RaleyField on Sunday December 14, 2014 @05:59PM (#8749901)
> especially seeing how trivial it is in x86 assembly (add the numbers, then check the overflow flag)

I'm no expert, especially not on modern x86 processors or compilers for them, but I suspect it isn't so trivial as scattering such instructions may affects branch predictor tables and indirectly degrade performance in other parts of code.

Re:Fast integer overflow detection (2012) by TheLoneWolfling on Sunday December 14, 2014 @07:06PM (#8750059)
You require one branch regardless, and the trivial version is one branch, i.e. already at the minimum amount of branches.