Subject: Re: 1. uiopeek? 2. hashinit/hashdone?
To: Chapman Flack <firstname.lastname@example.org>
From: Thor Lancelot Simon <email@example.com>
Date: 06/04/2006 20:51:58
On Sun, Jun 04, 2006 at 08:17:27PM -0400, Chapman Flack wrote:
> Thor, how the devil DO you use this beast for non-power-of-two hash
> sizes? That eluded even me. FreeBSD's added a separate phashinit
> for that....
You always get power-of-two buckets, unless the implementation has changed
since I last looked at the guts. You just typically don't _use_ them all,
e.g. by using %prime instead of &mask as your hash function; &mask is a
pretty crappy hash function for a lot of purposes anyway.
The ifaddr hash code does this.
Thor Lancelot Simon firstname.lastname@example.org
"We cannot usually in social life pursue a single value or a single moral
aim, untroubled by the need to compromise with others." - H.L.A. Hart