> I think this is the overhead for mitigating by adding additional code
I think so too - as OP just said "dealing with," it wasn't clear to me that you were talking about just ignoring rather than handling.
I think so too - as OP just said "dealing with," it wasn't clear to me that you were talking about just ignoring rather than handling.
Although perhaps it can be used an an upper bound on the boost provided UB-free optimizations? That is, the overflow checking has both a direct cost, and prevents certain beneficial optimizations. Thus we can assume that the optimization benefit (on SPEC CPU 2006) is something less than 30%. That is to say, real, but not enormous compared to an algorithmic difference.