dmd codegen improvements
H. S. Teoh via Digitalmars-d
digitalmars-d at puremagic.com
Thu Aug 20 18:25:36 PDT 2015
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.
Have you tried using gdc -O3 (or ldc) to see if there's a big
difference?
T
--
Prosperity breeds contempt, and poverty breeds consent. -- Suck.com
More information about the Digitalmars-d
mailing list