[gold][patch] Reduce heap usage for string merge sections
Ian Lance Taylor
iant@google.com
Wed Jul 21 20:47:00 GMT 2010
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
More information about the Binutils
mailing list