dmd codegen improvements

Ivan Kazmenko via Digitalmars-d digitalmars-d at puremagic.com
Tue Aug 18 17:07:10 PDT 2015


On Tuesday, 18 August 2015 at 23:30:26 UTC, Walter Bright wrote:
> On 8/18/2015 4:05 PM, H. S. Teoh via Digitalmars-d wrote:
>> Maybe when I get some free time this week, I could look at the
>> disassembly of one of my programs again to give some specific 
>> examples.
>
> Please do.

Sorry to repeat myself, but isn't 
https://issues.dlang.org/show_bug.cgi?id=11821 such an example?

Perhaps other examples can be generated by examining the assembly 
output of some simple range-based programs.  So what I am 
suggesting is a kind of test-driven approach.  Just throw some 
random range stuff together, like
-----
import std.algorithm, std.range;
int main() {return [0,1,4,9,16] . take(3) . filter!(q{a&1}) . 
front;}
-----
and look at the generated assembly.  For me, the above example 
did not inline some FilterResult lambda call.  Isn't it the 
optimizer's fault in the end, one which can be addressed?

Besides, there are quite a few other hits at the bugzilla when 
searching for "backend" or "performance".


More information about the Digitalmars-d mailing list