This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] DT_GNU_HASH: ~ 50% dynamic linking improvement
- From: Paul Eggert <eggert at CS dot UCLA dot EDU>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: binutils at sources dot redhat dot com, libc-alpha at sources dot redhat dot com, Michael Meeks <michael dot meeks at novell dot com>
- Date: Wed, 28 Jun 2006 11:45:44 -0700
- Subject: Re: [PATCH] DT_GNU_HASH: ~ 50% dynamic linking improvement
- References: <20060628170900.GX3823@sunsite.mff.cuni.cz>
Jakub Jelinek <email@example.com> writes:
> (Dan Bernstein's string hash function posted eons ago on comp.lang.c.)
Bernstein now prefers XOR, i.e.,
"h = h * 33 ^ c;" instead of
"h = h * 33 + c;". Did you try that as well?
Several sources indicate it's a bit better, e.g.,
> We have tested a bunch of different hash functions
Which hash functions did you try? One-at-a-time? FNV? You'll
probably get hassled by hash triviists (like me :-) no matter which
function you choose, but you can forstall that to some extent by
mentioning which functions you tested.
(Thanks for doing all this, by the way.)