DT_GNU_HASH latest patches

djamel anonymous djam8193ah@hotmail.com
Fri Jul 7 15:57:00 GMT 2006


Hello, first i thank you for testing my suggestion.in the patch, i have 
noted the current line
cinfo.maskbits = bfd_log2 (cinfo.nsyms) + 1;
the size of the hash table is between cinfo.nsyms*2 and cindo.nsysm*4 bits 
which will filter between 1/2 and 1/4 of the unsuccessful queries.perhaps 
the a size of bfd_log2 (cinfo.nsyms) + 2 or
bfd_log2 (cinfo.nsyms) + 3 would give better results.
the rounding i was suggesting was to round cinfo.nsyms to the nearest power 
of two and then multiply by 8 this would have given 8*cinfo.nsyms bits on 
average . but perhaps with this the table would have been too big ti fit 
inisde the hash table.the code to do that would have been:
tmp=bfd_log2 (cinfo.nsyms)*8;
if(tmp&(1<<(bfd_log2(cinfo.nsyms)-2)))
  cinfo.maskbits = tmp;
else
  cinfo.maskbits = tmp-1;
there is perhaps an ideal value for maskbits that would have to be selected 
by benchmarking differenr value; a large value of maskbits would avoid many 
accesses to the buckets but reduce the chances of maskbits to fit in the l1 
cache.
best regards.

_________________________________________________________________
MSN Hotmail : créez votre adresse e-mail gratuite & à vie ! 
http://www.msn.fr/newhotmail/Default.asp?Ath=f



More information about the Binutils mailing list