<div dir="ltr"><div class="gmail_extra">Sorry it has taken some time to reply, but I firmly disagree with this patch. I do not think this is the correct direction for LLVM. It makes an already confusing and poorly understood API easy to use in a buggy way by becoming modal in its concurrency. I think that is the wrong design.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 27, 2015 at 7:21 AM, Erik Eckstein <span dir="ltr"><<a href="mailto:eeckstein@apple.com" target="_blank">eeckstein@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":880" class="a3s" style="overflow:hidden">Hi Owen, Chandler,<br>
<span class=""><br>
> Do you mean with a release *+* asserts build?<br>
<br>
<br>
</span>Yes, sorry I wrote it wrong.<br>
<br>
I think initial description was not very good. I'll try to explailn again: there are two issues<br>
<br>
1. multithread-performance problem in the assert build: I understand that assert builds are slower than release builds, but in this case it's a factor of 4 when running with 4 threads, i.e. the multithreaded version is slower than the single-threaded version! This makes the asserts build useless for my purpose.<br></div></blockquote><div><br></div><div>I would much rather remove the assert than add this complexity. I think making the synchronization contract of an API modal and subtle in this way is a terrible tradeoff to fix a performance problem in an *asserts* build.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":880" class="a3s" style="overflow:hidden">
<br>
2. Even in the release build there is a performance penalty of about 5% because of the mutex.</div></blockquote></div><br>You mean without asserts at all? I cannot reproduce this and I have tried very hard. As far as I'm aware, the only way this happens is if you continually destroy and re-create your passmanager. If you stop doing that, the performance hit should go away.</div></div>