On Tuesday, 18 August 2015 at 22:14:52 UTC, Walter Bright wrote:
On 8/18/2015 3:04 PM, deadalnix wrote:
My understanding is that the inliner is in the front end. This
definitively do
not work the way I describe it here.
But it uses a cost function and runs repeatedly until there is
no more inlining to be done.
You need to have the optimization done on the way down or the
cost function only tells you about the unoptimized cost, which
doesn't really matter, especially after inlining is done as the
code can become fairly redundant.
It stand for 'scalar replacement of aggregate' aka SROA (not
SRAO).
You can find literature on the subject.
I'm aware of the technique, though I didn't know the name for
it (I always called it "horizontal slicing of aggregates"). It
is one optimization that dmd could significantly benefit from,
and wouldn't be too hard to implement. The ubiquitous use of
ranges makes it a much more important optimization.
I suspect it would net much more than 0.5%.
Yes. It would make many thing apparent to other part of the
optimizer.