<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 28, 2016 at 7:59 AM, Davide Italiano <span dir="ltr"><<a href="mailto:davide@freebsd.org" target="_blank">davide@freebsd.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="">On Sun, Jun 26, 2016 at 2:22 AM, Rui Ueyama via llvm-commits<br>
<<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
> ruiu added a comment.<br>
><br>
> So a natural question to ask is how slow it is if you have symbol patterns that contain "*"? I'd appreciate if you run a benchmark.<br>
><br>
> Also, how slow is it if you use matchStr function defined in LinkerScript.cpp?<br>
><br>
<br>
</span>I tried using matchStr (as there were wildcard matching in arbitrary<br>
places and also '?') and for libreoffice libraries build, the final time to link<br>
is around 1.1% slower with wildcard matching. I'd go for using<br>
matchStr for now, and probably refactor as NFC commit to improve<br>
performance if somebody really cares.<br>
Again, version scripts are not that frequent and wildcard matching in<br>
version scripts are even less so, so I'm not too worried about<br>
spending time optimizing this case.  If you agree, I'll produce a new<br>
version of the patch.</blockquote><div><br></div><div>Please upload a new patch. I may have comments on details, but in general I'd use matchStr because there's no fast way to do string matching in general.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Also, do you have any suggestions about where<br>
matchStr should live now that linkerscript and version script code<br>
both use it?<br></blockquote><div><br></div><div>Good question. There seems to be no good place to put this function. I'd probably leave the function in LinkerScript.cpp and add function declarations to both headers for now. </div></div></div></div>