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: [gold][patch] Reduce heap usage for string merge sections


Cary Coutant <ccoutant@google.com> writes:

>> There may be a minor win available by reserving the size of the
>> merged_strings_list vector for a large input section.
>
> Good idea -- do you have a suggestion for estimating that? I could
> just divide the size of the section by a presumed average string
> length. The average string length might depend heavily on the source
> language and what the section is, though. (Although I suppose a
> conservative estimate, based on a large average string length, is
> better than doing nothing.)

The cost of overestimating is not that high, so I would just assume that
each string has, say, 8 characters.

Ian


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