This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] ld speedup 1/3 (suffix merge)
- From: Bryce McKinlay <bryce at mckinlay dot net dot nz>
- To: binutils at sources dot redhat dot com
- Date: Thu, 25 Sep 2003 21:07:41 +1200
- Subject: Re: [patch] ld speedup 1/3 (suffix merge)
Hi Guys,
I can report that this patch reduces link time for libgcj.so from over
1:30 to 9 seconds on an AMD XP 1800! This was actually something I was
planning on looking into after noticing that functions in merge.c
accounted for >98% of the linker's runtime, but you guys have beaten me
to it. Thanks!
I can confirm there is a problem with hash collisions however - libgcj
has over 1M .debug_str strings. Fitting these all in a hashtable with
~4000 entries is sure to be inefficient. Sure enough, changing
sec_merge_init to use bfd_hash_table_init_n with a size of ~50000
almost halved the link time again to ~4.5 seconds.
Is there a way to work out (or estimate) the number of entries in the
strings section, and set the size of the hash table appropriately?
Regards
Bryce.