<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 4, 2017 at 2:35 PM, Rafael EspĂ­ndola via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> It might do, keeping in mind that reading pretty much every existing object<br>
> file format already requires scanning for string lengths. Certainly<br>
> something to try and evaluate, at least.<br>
<br>
</span>In lld strlen does show up in the profile. I haven't benchmarked it<br>
recently enough to remember exactly how much.<br></blockquote><div><br></div><div>It used to take substantial share of the total execution time (IIRC ~10%), but since we read only global symbol names, that isn't taking that much time now.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The string table builder code currently supports tail merging. On ELF<br>
at least that is a very modest size saving. If the size is written as<br>
a prefix to the string, that doesn't work. If the size is stored in<br>
the reference (like a stringef) we would be able to merge any<br>
substring (not sure if it is profitable).<br>
<br>
Cheers,<br>
Rafael<br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div></div>