Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Apr 1997 21:30:02 +0900 (JST)
From:      Michael Hancock <michaelh@cet.co.jp>
To:        David Greenman <dg@root.com>
Cc:        Poul-Henning Kamp <phk@dk.tfs.com>, fs@freebsd.org
Subject:   Re: the namei cache... 
Message-ID:  <Pine.SV4.3.95.970424212315.13828A-100000@parkplace.cet.co.jp>
In-Reply-To: <199704241208.FAA09111@root.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 24 Apr 1997, David Greenman wrote:

>    It's interesting that the single largest CPU consumer on wcarchive appears
> to be the namei cache lookups. I think the hash algorithm needs to be
> re-visited at the very least, perhaps changing the divide by a prime into
> some sort of xor of the filename characters (xored in pairs as int16's).

I don't think you need to even look at all the characters.  You can take
the first and last and couple in the middle.  To get the middle ones,
instead of dividing the length by 2 do a bit shift on the length.  Then
xor the 2 pairs.  Any hash guru's on the list? 

Mike Hancock





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SV4.3.95.970424212315.13828A-100000>