<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 14, 2016 at 7:25 AM, Rafael EspĂ­ndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">> In total, this patch improves link time of lld itself about 12%<br>
> (3.50 seconds -> 3.08 seconds.)<br>
<br>
</span>That is quite slow, is in a debug build that you are linking? What is<br>
the size of the string table if you use discard_locals? I wonder if we<br>
are keeping more symbols than gold or bfd.<br></blockquote><div><br></div><div>That is a debug build. I haven't tried discard_locals yet,</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Have you tried just not calling StrTabBuilder.finalize() similar to<br>
what we do for SHF_STRINGS sections when not optimizing? That way we<br>
would have fast linking at -O0 and smaller tables at -O2.<br></blockquote><div><br></div><div>and neither StrTabBuilder.finalize(). But I don't want to use StrTabBuilder.finalize() because the API has the problem as I described in this patch. Look for "Why two phases?" and read the comment. Also, I think StringTableBuilder is slower than this implementation even if we don't call finalize() because StringTableBuilder copies strings, while this implementation does not (it keeps only StringRefs).</div></div></div></div>