Re: more on hash functions

Chuck Lever (cel@monkey.org)
Tue, 13 Apr 1999 14:45:54 -0400 (EDT)


On Tue, 13 Apr 1999, Horst von Brand wrote:
> > actually, this was my first implementation choice. i found that the hash
> > function didn't work very well with 3 8-bit tables -- it had poor
> > bucket size distribution characteristics. how does one combine 3 8-bit
> > values appropriately to get, say, a 14-bit table index?
>
> a ^ (b << 3) ^ (c << 6)

that's what i tried... it doesn't work as well as x-oring these values
together *without* the shifts. i was wondering if there was a better way
to do it.

- Chuck Lever

--
corporate:	<chuckl@netscape.com>
personal:	<chucklever@netscape.net> or <cel@monkey.org>

The Linux Scalability project: http://www.citi.umich.edu/projects/citi-netscape/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/