This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: overhead of bfd_{get,put}*()


David Miller <davem@davemloft.net> writes:

> From: Ian Lance Taylor <iant@google.com>
> Date: Tue, 23 Feb 2010 08:00:55 -0800
>
>> David Miller <davem@davemloft.net> writes:
>> 
>>> The top offenders were, surprisingly for me, bfd_getb64(),
>>> bfd_putb64() and bfd_getb_signed_64().  And it's not because they
>>> touch memory, it's the byte loads and shift/or dance they do.
>> 
>> This is exactly why gold does its complex template dance: to avoid
>> that overhead.
>> 
>> Those functions will hit unaligned data in some cases.
>
> GOLD takes more than 11 seconds for this test case, which is almost 3
> seconds longer than the BFD linker :-) So it may be handling this
> specific issue well, but it does have other performance problems when
> there are so many relocations.
>
> I'll investigate at some point.

That is interesting.  Is there a linker script involved?  When there
is no linker script, I have not yet seen any cases where gold is
slower than GNU ld.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]