<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2013/8/18 monarch_dodra <span dir="ltr"><<a href="mailto:monarchdodra@gmail.com" target="_blank">monarchdodra@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">On Tuesday, 18 June 2013 at 07:58:06 UTC, Kenji Hara wrote:<br>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Inlining should remove performance penalty. Nobody holds the immediately<br>
called lambda, so it should be treated as a 'scope delegate'. For that, we<br>
would need to add a section in language spec to support it.<br>
</blockquote>
<br></div>
Kenji:<br>
<br>
I've been doing some benchmarks recently: Using an "inlined lambda" seems to really kill performance, both with or without "-inline" (tested with both dmd and gdc).<br>
<br>
However, using a named function, and then immediately calling it, there is 0 performance penalty (both w/ and w/o -inline).<br>
<br>
Is this a bug? Can it be fixed? Should I file and ER?<br>
</blockquote></div><br></div><div class="gmail_extra">I opened a new bugzilla issue:</div><div class="gmail_extra"><a href="http://d.puremagic.com/issues/show_bug.cgi?id=10848">http://d.puremagic.com/issues/show_bug.cgi?id=10848</a> <br>
</div><div class="gmail_extra"><br></div><div class="gmail_extra">And start working for the compiler and doc fix:</div><div class="gmail_extra"><a href="https://github.com/D-Programming-Language/dlang.org/pull/372">https://github.com/D-Programming-Language/dlang.org/pull/372</a> <br>
</div><div class="gmail_extra"><a href="https://github.com/D-Programming-Language/dmd/pull/2483">https://github.com/D-Programming-Language/dmd/pull/2483</a> <br></div><div class="gmail_extra"><br></div><div class="gmail_extra">
Kenji Hara</div></div>