dmd codegen improvements

Ivan Kazmenko via Digitalmars-d digitalmars-d at
Fri Aug 21 08:09:42 PDT 2015

On Friday, 21 August 2015 at 01:29:12 UTC, H. S. Teoh wrote:
> On Fri, Aug 21, 2015 at 01:20:25AM +0000, jmh530 via 
> Digitalmars-d wrote:
>> On Friday, 21 August 2015 at 00:00:09 UTC, H. S. Teoh wrote:
>>> The gdc version, by contrast, inlines *everything*,
>> This could be why I've observed performance differentials in 
>> dmd for doing some manual for loops rather than using the 
>> stuff in std.algorithms.
> Very likely, I'd say. IME dmd tends to give up inlining rather 
> easily. This is very much something that needs to improve, 
> since ranges in D are supposed to be a big selling point. 
> Wouldn't want them to perform poorly compared to hand-written 
> loops.

Yeah, ranges should ideally be a zero-cost abstraction, at least 
in trivial cases.

More information about the Digitalmars-d mailing list