4 ms·
> each register's carry bits are independent from the ones that get carries added from the last register No they're not. Let's say B's non-carry bits are all
by Suncho 6y ago
> each register's carry bits are independent from the ones that get carries added from the last register
No they're not. Let's say B's non-carry bits are all 1. If you carry anything from C, that will affect B's carry bits.
- londons_explore 6y agoYou could check if the middle 64-12-12 bits are all 1's, and if they are branch to a slow codepath. It would be an incredibly rare case, so branch prediction will always get it right, and the cost of a branch nearly nill.
- a1369209993 6y agoIf you're trying to add two 256-bit numbers, there's probably cryptography involved, and data-dependant branches are poison to crypto code.