blocks with attributes vs inlined lambda

monarch_dodra monarchdodra at gmail.com
Sun Aug 18 23:26:19 PDT 2013


On Monday, 19 August 2013 at 02:33:43 UTC, Kenji Hara wrote:
> 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

As always, thank you *very* much.


More information about the Digitalmars-d mailing list