Subject: Re: CVS commit: syssrc/sys/miscfs/nullfs
To: Bill Studenmund <wrstuden@netbsd.org>
From: Perry E. Metzger <perry@wasabisystems.com>
List: source-changes
Date: 03/06/2002 21:20:44
The right thing to do is make the hash table dynamic. Then you only
need to guess a reasonable initial value and if you're wrong you're okay.

Bill Studenmund <wrstuden@netbsd.org> writes:
> On Wed, 6 Mar 2002, Bill Sommerfeld wrote:
> 
> > The general rule of thumb for hash tables is to size a hash table
> > intended to store N items to have roughly N buckets.
> 
> Right. The question though is what should N be. I agree it should be
> something other than 16. :-)
> 
> > If you have to traverse long chains, you wind up with O(N) rather than
> > O(1) behavior.
> 
> Indeed.
> 
> Take care,
> 
> Bill
> 
> 

--
Perry E. Metzger		perry@wasabisystems.com
--
NetBSD: The right OS for your embedded design. http://www.wasabisystems.com/