<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 25, 2017 at 12:36 PM, Vedant Kumar <span dir="ltr"><<a href="mailto:vsk@apple.com" target="_blank">vsk@apple.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=""><br>
> On Apr 25, 2017, at 12:24 PM, Scott Smith <<a href="mailto:scott.smith@purestorage.com">scott.smith@purestorage.com</a>> wrote:<br>
><br>
> well, top-of-branch lldb uses this code, that's how I found it.  Do you mean libc++'s demangler?<br>
<br>
</span>Thanks for explaining, this is the first time I'm looking at the demangler situation. It looks like libcxxabi has an arena-based demangler, and that the one in llvm is different.<br>
<br>
I'm confused by this because the comment in llvm says that libcxxabi is supposed to reuse the llvm demangler. This doesn't seem to be happening, right?<br></blockquote><div><br></div><div>I'm confused too.  I'm new here :-)<br></div><div> <span class=""></span><br><span class=""></span></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
> FYI when I said 14+% (and now it's 17%), I mean the overall performance of starting lldb, not just the demangler itself.  It's probably several times faster now with this change (<a href="https://reviews.llvm.org/D32500" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D32500</a>)<br>
<br>
</span>Do you know what the llvm policy is on using TLS in library code? I can't find any mention of this in the programmer's manual, and my officemates don't know either.<br></blockquote><div><br></div><div>I don't know, and frankly I don't like using it.  It was more "to get the conversation started."  I can change all the string routines to take the arena as a parameter, it'll just make the diff look larger.<br><br></div><div class="h5">But if libcxxapi has already done the heavy lifting then maybe I should just benchmark their demangler instead.<br><br>
</div></div></div></div>