Re:Beautiful branchless binary search
by 2102922286 on Friday April 28, 2023 @02:44AM
(#35738226)
If what you're saying is (roughly)
cmovne rax, rdx
jmp rax
that is, a cmov followed by an indirect jump to the address contained in rax, "jmp rax" is _always_ an indirect jump. It doesn't matter whether rax was set via a conditional move instruction or not.
Either way, it seems that the wisdom has change since the last time I wrote and read assembly. Cmov used to be slow. It seems that the current answer is "it depends".