Article View: comp.sys.atari.st
Article #4506Re: Binary Searching
From: Leo de Wit
Date: Tue, 03 Oct 1989 05:28
Date: Tue, 03 Oct 1989 05:28
14 lines
1180 bytes
1180 bytes
In article <Sep.27.16.19.22.1989.2257@topaz.rutgers.edu> 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.
Technical Details
Message-ID:
<1089@philmds.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!hp4nl!phigate!philmds!leoReferences:
<Sep.27.16.19.22.1989.2257@topaz.rutgers.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <Sep.27.16.19.22.1989.2257@topaz.rutgers.edu> Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 14