by localhost · 3y ago · 0 comments
> Yes, with the name "Shar's algorithm," I can confirm that this branchless binary search algorithm is indeed known as Shar's algorithm. It's a variation of the Binary Search algorithm that focuses on minimizing branching to improve performance on modern CPUs. The algorithm is named after its creator, Andrei Alexandrescu, who goes by the pseudonym "Shar" on the internet.
(The actual Leonard E Shar seems to have his name on a single paper, which is not about this, but about a pipelined processor, interesting in its own right.)
https://en.wikipedia.org/wiki/Andrei_Alexandrescu#Child_prod...