hash function for mac needed

Henry Spencer henry at zoo.toronto.edu
Thu Jun 20 02:19:59 AEST 1991


In article <567 at smds.UUCP> rh at smds.UUCP (Richard Harter) writes:
>> ... a fast hash function is
>> better than a slower-but-better-distribution function...
>In one of my programs I found it quite profitable to only look at the last
>ten characters of a string...
>Admittedly this appears crude, but in practice the last ten bytes were
>all that were really needed...

In fact, when I originally did the hashed newsgroup-lookup code in C News
expire, a quick investigation did not reveal any hashing function which
had overall performance much better than simply using the length of the
string!  (The newsgroup list has grown so much that this decision is in
need of revision, mind you.)
-- 
"We're thinking about upgrading from    | Henry Spencer @ U of Toronto Zoology
SunOS 4.1.1 to SunOS 3.5."              |  henry at zoo.toronto.edu  utzoo!henry



More information about the Comp.lang.c mailing list