Redo gas local symbol support

Alan Modra amodra@gmail.com
Thu Sep 3 01:05:12 GMT 2020
On Mon, Aug 24, 2020 at 09:52:57AM +0200, Martin Liška wrote:
> Hey.
> 
> Just to inform you, the patch introduced a nice speed up:
> https://sourceware.org/bugzilla/show_bug.cgi?id=26381#c9
> 
> Is there still anything obvious from the perf report that
> suggests what can be improved now?

No, I didn't see anything obvious in the perf report.  No doubt the
major thing that helped speed with the local symbol changes was simply
combining the struc local_symbol and struct symbol hash tables,
resulting in fewer hash table searches.

The patch also reduced copying of memory when converting local_symbol
to symbol, but any gain there would be offset somewhat by needing an
extra pointer deref for struct xsymbol fields.  I guess I did remove
one pointer dereference by doing away with your struct symbol_entry
where you had hash table entry info, hash and name, with a pointer to
the symbol struct, instead putting the hash table entry info directly
into the symbol structs.  That trick might work for some of the other
hash tables.

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list