Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Apr 1997 15:42:23 +0200
From:      Poul-Henning Kamp <phk@dk.tfs.com>
To:        Michael Hancock <michaelh@cet.co.jp>
Cc:        David Greenman <dg@root.com>, Poul-Henning Kamp <phk@dk.tfs.com>, fs@freebsd.org
Subject:   Re: the namei cache... 
Message-ID:  <357.861889343@critter>
In-Reply-To: Your message of "Thu, 24 Apr 1997 21:30:02 %2B0900." <Pine.SV4.3.95.970424212315.13828A-100000@parkplace.cet.co.jp> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.SV4.3.95.970424212315.13828A-100000@parkplace.cet.co.jp>, Mich
ael Hancock writes:
>
>>    It's interesting that the single largest CPU consumer on wcarchive appear
>s
>> 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? 

I'd rather get rid of it entirely...

--
Poul-Henning Kamp           | phk@FreeBSD.ORG       FreeBSD Core-team.
http://www.freebsd.org/~phk | phk@login.dknet.dk    Private mailbox.
whois: [PHK]                | phk@tfs.com           TRW Financial Systems, Inc.
Power and ignorance is a disgusting cocktail.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?357.861889343>