News for hackers. Stuff that matters.
Re:Beautiful branchless binary search by kevingadd on Friday April 28, 2023 @03:03AM (#35738355)
Wow, the dispatch queue is so deep! The trace makes a lot of sense, thanks for sharing it. I must have been unclear if it sounded like I was saying cmov was a bottleneck - my argument is just that it's not going to be especially faster than a branch in the general case.

Great point that memory reads are going to dominate a binary search - at that point the CPU will be spending a lot more time waiting for memory than it is spending executing your branches or cmovs.

There are no comments on this comment yet.