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: [patch x64 SEH]: Support xdata/pdata for link-once code


On 09/14/2010 10:06 AM, Kai Tietz wrote:
> Hmm, is there such a mass of different code-segments to be expected
> within one file that we will see here a real gain using hash-tables?

With a large c++ file, with either -ffunction-sections or templates
(which are going to use link-once sections), you may well have on
the order of tens of thousands of code segments.  And each one of
those code segments will be used exactly once.

Each will result in a failing search through the linked list.  Better
to fail earlier if possible, either through C1*O(log N) tree or C2*O(1)
hash table.  I don't recall the relative magnitude of C1 and C2 in this
case, so I'd choose the one that's easier to use.

Of course, there's the other common case of all functions in .text.
If you use the hash table, it might be worth-while to not store the
standard text section in the table, but in a separate variable.


r~


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