Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!hp4nl!phigate!philmds!leo
From: leo@philmds.UUCP (Leo de Wit)
Newsgroups: comp.sys.atari.st
Subject: Re: Binary Searching
Summary: use hashing
Message-ID: <1089@philmds.UUCP>
Date: 3 Oct 89 05:28:30 GMT
References: 
Reply-To: leo@philmds.UUCP (Leo de Wit)
Organization: Philips I&E DTS Eindhoven
Lines: 14

In article  clong@topaz.rutgers.edu (Chris Long) writes:
|
|I find myself needing a really hot 68000 binary search routine.  This
|routine will be called millions of times, so it should be as efficient
|as possible.  I need it to go through about 10,000 items, each with a
|size of ~ 10 bytes.  Does anyone have something like this already coded?

If you're really in for speed, why bother with _binary_ searching ? Use
hashed searching instead. The binary one will need some 13, 14 lookups
& compares, the hashing one - depending on the hashing function and the
filling - much less (1? 2? 3?) plus some time to calculate the hashing
function.

    Leo.