[Commited] Extend BFD hash size table

Nick Clifton nickc@redhat.com
Mon Jan 9 17:28:00 GMT 2006


Hi Paul, Hi Doug,

>  >> I have always thought that using prime numbers as the hash table
>  >> size was necessary in order to get an efficient use of all the
>  >> buckets.  Of course this may just be an urban myth, I do not know
>  >> of any actual theoretical work to back this up.
> 
>  Doug> Knuth Volume 3, 6.4 Hashing ?

Really ?  I sadly do not have these volumes, so I will take your word 
for it.

Paul>
> If you use "add the hash" rehashing as the way to resolve hash
> collisions, then you need a prime size.  For other schemes, like
> linked list buckets, sequential probe, etc., any table size works,
> assuming of course that the hash function itself is good.

I must admit that I have not tried using powers of two instead of prime 
numbers.  I will give it a go some time.

If you or anyone else has any results related to this subject please do 
post them to the list.

Cheers
   Nick



More information about the Binutils mailing list