Moritz Maxeiner wrote:

I don't know, but I'd guess that the length of a function is not as important for the consideration of being inlined as its semantics.
yep. basically, dmd doesn't like anything other than very simple if/else conditions. sometimes it likes

 if (cond0) return n0; else if (cond1) return n1; ...

more than the same code without else.

don't even try to inline loops. ;-)

anyway, in my real-life code inlining never worth the MASSIVELY increased compile times: speedup is never actually noticeable. if "dmd -O" doesn't satisfy your needs, there is usually no reason to trying "-inline", it is better to switch to ldc/gdc.

Reply via email to