This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH][binutils/bfd] Fixed performance of LD (linker) when manynames end the same way
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Yuri <yuri at rawbw dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 09 Sep 2003 18:48:55 +0930
- Subject: Re: [PATCH][binutils/bfd] Fixed performance of LD (linker) when manynames end the same way
- References: <1063076942.3f5d444e58e40@webmail.rawbw.com>
On Mon, Sep 08, 2003 at 08:09:02PM -0700, Yuri wrote:
[splay-tree re-implementation of string merge]
I like the fact that the code now looks simpler. Do you have figures
for performance improvement?
However, there are some problems with your patch. First and most
obvious is that you haven't followed the coding standard. Please see
http://gcc.gnu.org/contribute.html. Secondly, there are some
retrograde changes in cmpsuffixentry, which should keep the const on A
and B, and has no need for a cast on the right hand side when
initializing A and B. Lastly, more of an improvement rather than a
criticism, I think you might generate better code if rmemcmp takes
pointers to one past the end of the string. It then becomes fairly
obvious that the 3 calls to rmemcmp can be collapsed into one.
--
Alan Modra
IBM OzLabs - Linux Technology Centre