Creeping Bloat in Phobos

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 27 15:26:35 PDT 2014


On 9/27/2014 2:59 PM, Peter Alexander wrote:
> On Saturday, 27 September 2014 at 20:57:53 UTC, Walter Bright wrote:
>> From time to time, I take a break from bugs and enhancements and just look at
>> what some piece of code is actually doing. Sometimes, I'm appalled.
>
> Me too, and yes it can be appalling. It's pretty bad for even simple range
> chains, e.g.
>
> import std.algorithm, std.stdio;
> int main(string[] args) {
>    return cast(int)args.map!("a.length").reduce!"a+b"();
> }
>
> Here's what LDC produces (with -O -inline -release -noboundscheck)

Part of this particular case problem is not a compiler optimizer weakness, but 
that autodecode problem I've been throwing (!) chairs through windows on.



More information about the Digitalmars-d mailing list