This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Add objc-lang.c, further cleanup - TAKE TWO


On Tue, Dec 04, 2001 at 05:36:01AM +0000, Neil Booth wrote:
> 
> Incidentally, the NetBSD people tried out a bunch of hash functions
> for their kernel (including the much-touted FNV) for hashing both text
> and binary data last week.  They found that the Perl hash was one of
> the best, in terms of both speed and distribution.  They tested some
> hash from GCC 2.95, which wasn't as good as the Perl one.

Reference?  I'd like to see this.

> I tried out the cpplib hash on about 10000 file names (their test for
> text) and 1.5MB of /dev/urandom output (their test for binary data).
> I found that the current cpplib hash was as good as the Perl hash
> (same in speed, sometimes better sometimes worse for distribution).

Just yesterday I found an old letter from someone suggesting I try just

   hash = hash * 9 + ch

for the hash step.  If you have a harness set up to do these tests
already, mind trying that one?

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]