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?