This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: DT_GNU_HASH latest patches
- From: "djamel anonymous" <djam8193ah at hotmail dot com>
- To: jakub at redhat dot com
- Cc: binutils at sources dot redhat dot com, drepper at redhat dot com, michael dot meeks at novell dot com, libc-alpha at sources dot redhat dot com
- Date: Fri, 07 Jul 2006 15:56:59 +0000
- Subject: Re: DT_GNU_HASH latest patches
- Bcc:
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