News for hackers. Stuff that matters.
Re:Dual-Pivot Binary Search by asgard1024 on Thursday February 06, 2014 @11:51AM (#7191289)
Maybe I misunderstand something, but I thought the whole point of selecting two pivots in Quicksort was to reduce impact of particularly bad pivot selection.

In this case, I don't know.. Unlike in Quicksort, there is no huge cost after selecting the pivot depending on it's value.

I guess it could be useful if you could expect you're searching for items with a different random distributions than are the items in the list, e.g. you search for uniformly distributed elements in a list with non-uniform distribution (like a highly skewed one).

Re:Dual-Pivot Binary Search by vkostyukov on Friday February 07, 2014 @04:09AM (#7195427)
Having two pivots in Quicksort reduces the number of swaps (# of comparisons is the same).