Yet another strike against the current AA implementation

bearophile bearophileHUGS at lycos.com
Mon Apr 27 05:13:48 PDT 2009


> Michel Fortin:
> > Isn't there room for optimisation on the compiler side though? I mean,
> > the compiler could inline opApply, and while doing so it could notice
> > that the delegate is constant and inline it too. I suspect that adding
> > this optimisation would put opApply at the same performance level than
> > ranges.

Daniel Keep:
> Inlining does not automatically make things faster.

That's true in general: if you inline too much code you may end up with too much code to be moved inside and out of the caches, reducing the performance.
I agree with Michel, if done wisely by the compiler some inlining may help with such loops.

Bye,
bearophile



More information about the Digitalmars-d mailing list