2 ms·
I expected discussion of __builtin_parity and cmov at least.
by o11c 3y ago
I expected discussion of __builtin_parity and cmov at least.
- thomasmg 3y agoMe too. Reading the article, there seems to be no attempt to replace the two remaining "if" statements, and so, avoid branches. It doesn't even need to be CMOV: possibly introducing tmppar1 and tmppar2 = tmppar & (an operation that is either 0 or -1). And then always rp12 ^= tmppar1; rp14 ^= tmppar2; -- it might not be faster, but that's what I would try at least.
- xxpor 3y agoThis article references gcc 4.1, __builtin_parity is likely newer than that.