blocks with attributes vs inlined lambda

Kenji Hara k.hara.pg at gmail.com
Sun Aug 18 19:33:33 PDT 2013


2013/8/18 monarch_dodra <monarchdodra at gmail.com>

> On Tuesday, 18 June 2013 at 07:58:06 UTC, Kenji Hara wrote:
>
>> Inlining should remove performance penalty. Nobody holds the immediately
>> called lambda, so it should be treated as a 'scope delegate'. For that, we
>> would need to add a section in language spec to support it.
>>
>
> Kenji:
>
> 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).
>
> However, using a named function, and then immediately calling it, there is
> 0 performance penalty (both w/ and w/o -inline).
>
> Is this a bug? Can it be fixed? Should I file and ER?
>

I opened a new bugzilla issue:
http://d.puremagic.com/issues/show_bug.cgi?id=10848

And start working for the compiler and doc fix:
https://github.com/D-Programming-Language/dlang.org/pull/372
https://github.com/D-Programming-Language/dmd/pull/2483

Kenji Hara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130819/18f4a0f3/attachment.html>


More information about the Digitalmars-d mailing list