Aggressive conditional inlining with ldc only, not dmd
Nordlöw
per.nordlow at gmail.com
Sun Mar 25 22:09:43 UTC 2018
Is there a way to make ldc do more aggressive inlining other than
pragma(inline, true)
?
Reason for asking is that
https://github.com/nordlow/phobos-next/blob/master/src/open_hashmap_or_hashset.d
achieves much better performance when I qualify some inner loop
functions with
pragma(inline, true)
instead of
pragma(inline)
eventhough I compile with -release -inline -nobounds flags.
Unfortunately these functions cannot be inlined by dmd in release
mode so my code either runs slower than possible or it cannot be
built by dmd in release mode.
And I haven't found a way to conditionally qualify these inner
loop functions with `pragma(inline, true)` for the ldc case only.
More information about the Digitalmars-d-learn
mailing list