[PATCH] DT_GNU_HASH: ~ 50% dynamic linking improvement
Roland McGrath
roland@redhat.com
Wed Jun 28 21:49:00 GMT 2006
> One other (perhaps dumb) question: why limit yourself to a 32-bit hash
> on machines with 64-bit addresses? Since the application area
> (linking executables) is already architecture dependent, is there a
> downside to going with 64-bit hashes on such machines?
It halves the number of table entries that can fit in the machine's cache.
To overcome the memory and cache impact of doubling the table size, there
would have to be very, very common collisions of the 32-bit hash that don't
collide with a proposed 64-bit function. Since we can select a 32-bit hash
where collisions are acceptably rare in practice, it seems unlikely that
this tradeoff would ever balance.
More information about the Libc-alpha
mailing list