4 ms·
Thanks, you motivated me to find this Linus' take about the CMOV stalls: http://yarchive.net/comp/linux/cmov.html http://yarchive.net/comp/linux/cmov.html Bas
by acqq 11y ago
Thanks, you motivated me to find this Linus' take about the CMOV stalls:
http://yarchive.net/comp/linux/cmov.html http://yarchive.net/comp/linux/cmov.html
Basically, if the direction is predictable, jump can be faster because the mov is then "unconditional." The strange thing is that the binary search on average shouldn't be predictable. So it's still the question what was measured there. Maybe always an element on the position a[0], even when the array was big?