[patch] ld speedup 1/3 (suffix merge)
Lars Knoll
lars@trolltech.com
Wed Sep 10 08:57:00 GMT 2003
On Wednesday 10 September 2003 08:52, Jakub Jelinek wrote:
> On Tue, Sep 09, 2003 at 06:06:06PM +0200, Michael Matz wrote:
> > With a debug build the objects don't fit completely in the disc cache,
> > hence the larger real time, that user time. For entertainment here the
> > sizes of the three binaries in debug build:
> >
> > 4713844 2003-09-09 17:11 assistant
> > 34832011 2003-09-09 17:11 designer
> > 64162740 2003-09-09 17:11 libqt-mt.so.3.2.1
> >
> > This patch doesn't introduce any regressions (and we use the whole
> > patchset in our distribution since some time, additionally of having it
> > tested by some dozen KDE developers). I'll cleanup and submit the other
> > two changes in some hours. Copyright assignment of Lars and me should be
> > on the way.
> >
> >
> > Ciao,
> > Michael.
> >
> > 2003-09-09 Lars Knoll <lars@trolltech.com>
> > Michael Matz <matz@suse.de>
> >
> > * merge.c (cmplengthentry, last4_eq, last_eq): Delete.
> > (strrevcmp, is_suffix): New.
> > (merge_strings): Use them to implement fast suffix merging.
> > * elf-strtab.c (cmplengthentry, last4_eq): Delete.
> > (strrevcmp, is_suffix): New.
> > (_bfd_elf_strtab_finalize): Rework to implement fast suffix
> > merging.
>
> Nice. Have you also compared the sizes of resulting
> .rodata/.debug_str/.dynstr sections created by ld before and after your
> patch?
> When I submitted merge.c I had in mind small .rodata.str* sections
> so didn't care much about its speed; .debug_str which is typically way
> bigger came later.
The size of the resulting binary/shared library didn't change with our patch.
We're still doing the same amount of string merging as before.
Cheers,
Lars
More information about the Binutils
mailing list