3 ms·
I think the question we have to ask is why it has such a performance cost, and how we can circumvent it. There are likely multiple necessary changes for it to
by im3w1l 3y ago
I think the question we have to ask is why it has such a performance cost, and how we can circumvent it.
There are likely multiple necessary changes for it to be fast. One part is implementing the check quickly, this could be hardware assisted. Another is addressing all the optimizations the compiler does by asuming that there is no overflow, and figuring out alternative ways to get the compiler to emit fast code.