Re: Binary Search



On Tue, 19 Jun 2007 06:42:05 -0400, John Dough
<nobody@xxxxxxxxxxxxxxx> wrote:

As long as the number of duplicates is less than N - log N, the hybrid
search will go faster than a plain linear search. It's only when you
have *lots* of duplicates that a linear search will outperform this
hybrid search, and then only by a little bit.

You're right about this. I didn't read it correctly the first time.
A plain sequential search will outperform the hybrid search when the
number of matches is pretty much equal to N (in other words, it would
have to be 98% or more).
.