Inlining of immediately called function literals
w0rp via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jul 26 15:19:46 PDT 2014
On Saturday, 26 July 2014 at 17:55:55 UTC, Marc Schütz wrote:
> The language reference on functions [1] says:
>
> "If a FunctionLiteral is immediately called, its inlining would
> be enforced normally."
>
> How is this to be interpreted?
>
> [1] http://dlang.org/function
I would interpret that as saying it's a pretty fair bet that it
will be inlined by an optimising compiler. Especially with LDC or
GDC. DMD I think is often lacking in optimisations, but I use it
during development pretty excessively due to its compilation
speed and DMD always being the first to support all recent
language features.
More information about the Digitalmars-d
mailing list