<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Dec 1, 2017 at 2:10 PM, Rafael Avila de Espindola <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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> writes:<br>
<br>
> On Fri, Dec 1, 2017 at 1:41 PM, Rafael Avila de Espindola <<br>
> <a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br>
><br>
>> Rui Ueyama via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> writes:<br>
>><br>
>> > ruiu updated this revision to Diff 125067.<br>
>> > ruiu added a comment.<br>
>> ><br>
>> > - clang-format<br>
>> ><br>
>> > It seems this patch actually makes that test case 2% faster, which<br>
>> > isn't a negligible improvement.<br>
>><br>
>> Please benchmark more than clang. There is a set of different benchmarks<br>
>> in <a href="https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz" rel="noreferrer" target="_blank">https://s3-us-west-2.<wbr>amazonaws.com/linker-tests/<wbr>lld-speed-test.tar.xz</a>.<br>
><br>
><br>
> We don't need to run all these benchmarks as this patch is a micro<br>
> optimization. More precisely, in order to create a hash table for 22212<br>
> symbols,<br>
><br>
>  - GnuHashTableSection::<wbr>addSymbols took 60 ms<br>
>  - GnuHashTableSection::<wbr>writeHashTable took 8 ms.<br>
><br>
> With this patch it now takes 37 ms and 7 ms, respectively.<br>
<br>
</span>I am uncomfortable LGTMing an optimization without a full<br>
benchmark. Specially one that trades memory for speed.<br></blockquote><div><br>There's no memory-to-CPU tradeoff. There was a 32-bit padding at end of `Entry` struct.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I will benchmark the patch. This will hopefully get better soon with a<br>
bot tracking performance.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div></div>