A peek past lambda

Neal Gafter neal at gafter.com
Sun Aug 21 09:17:30 PDT 2011


On Sunday, August 21, 2011, Llewellyn Falco <isidore at setgame.com> wrote:
> I'm curious as to the following statement:
>
>>
>> Lambdas are slow as hell in C#, I don't want to do the same mistake.

In .NET the creation of a lambda that captures some local state requires one
memory allocation for the frame object and one memory allocation for the
delegate object.  In contrast inner classes usually put the two together in
a single object.  I believe that is the largest contributing factor to the
performance difference.


More information about the lambda-dev mailing list