4 ms·
It's to make sure the result is either value 0 or value 1. Without this, the result could be like 2, and this is not wanted here.
by majke 4y ago
It's to make sure the result is either value 0 or value 1.
Without this, the result could be like 2, and this is not wanted here.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- twic 4y agoWhy does it matter, though? This macro just tells the compiler how to compile the branch, right?
- dzaima 4y ago__builtin_expect_with_probability knows nothing about booleans or branches. It assigns a probability for the first and second argument being equal, but 2!=1 while 2 is truthy.