[m-rev.] diff: add two string hash functions
pbone at csse.unimelb.edu.au
Fri Nov 12 21:09:58 AEDT 2010
On Fri, Nov 12, 2010 at 01:21:07PM +1100, Zoltan Somogyi wrote:
> Until now, all hash tables on strings used a single standard hash function.
> However, any single hash function has a pretty good probability of generating
> collisions on small hash tables.
> This diff adds two new hash functions on strings. When generating hash tables,
> we now try out all three hash functions, and use the one that generates
> the fewest collisions.
Is this for strings that are constant and known at compile time? If so is it
not better to generate perfect has functions for each switch in the way
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 490 bytes
Desc: Digital signature
More information about the reviews