[Issue 14498] Poor codegen optimization for ranges

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Apr 25 17:41:32 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14498

safety0ff.bugz <safety0ff.bugz at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |safety0ff.bugz at gmail.com

--- Comment #2 from safety0ff.bugz <safety0ff.bugz at gmail.com> ---
(In reply to weaselcat from comment #0)
> using the "slow"(aka ranges) version, DMD produces code that is 4 times
> slower. Almost same exact ratios for GDC, so I assume it's due to frontend(?)
> 
> LDC seems to optimize it away to almost identical performance between "fast"
> and "slow" version, unsure if it's due to the LLVM optimizations or one of
> their patches to dmd.
>

AFAIK slow version allocates a closure on the heap, perhaps LDC optimizes out
unnecessary closures.

--


More information about the Digitalmars-d-bugs mailing list