Repository navigation
Conversation
|
A little more description would be useful... Also cc @TurkeyMan |
|
Requires dlang/phobos#7059 |
|
see also #7690 (Still haven't been able to figure out why that one fails on Ocean yet). |
WalterBright
left a comment
There was a problem hiding this comment.
The reason this is not done is because always doing an inline scan slows down the compiler.
|
Doing this in away that doesn't always require an inline scan is a much more difficult fix than this is. |
This claim does make sense, but I'm not seeing any significant difference. There are other things in a build that contribute much more to the time than this. Here's my data compiling Phobos: With this PR: Without this PR: Also most of the inline scanning is gated here Lines 1691 to 1694 in e9ef759 pragma(inline, true) are subject to the full scan.
Then I suggest merging this and adding a bug report to implement the more difficult fix as an improvement. |
No, because the bug is not that significant in that its effect is minor, but this PR negatively affects everyone. There are too many higher priority things I need to work on. |
|
Here are timings for just the compiling stage of the phobos build: Without this PR: With this PR: |
It doesn't look like it negatively affects anyone, and would positively affect a few people including myself. |
|
A 1% slowdown is significant. |
|
Would you be willing to advise me with any specifics to improve this PR to your satisfaction? |
|
I don't really know of a good way to do it that isn't slow, or I'd have done it already. |
Currently the compiler does not attempt to do any inlining whatsoever regardless of any
pragma(inline, true)annotations. It will only attempt to inline functions if the compiler is invoked with the-inlineflag.This PR changes the behavior of
pragma(inline, true)so the compiler always attempts to inline a function annotated withpragma(inline, true) regardless of whether or not the compiler is invoked with the-inline` flag. All other behaviors remain the same.