This is the mail archive of the mailing list for the glibc 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: DT_GNU_HASH latest patches

Hello, first i thank you for testing my 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;
cinfo.maskbits = tmp;
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 !

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