Creeping Bloat in Phobos
bearophile via Digitalmars-d
digitalmars-d at puremagic.com
Sat Sep 27 15:52:21 PDT 2014
Walter Bright:
>> 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.
There is no char auto decoding in this program, right?
Note: in Phobos now we have std.algorithm.sum, that is better
than reduce!"a+b"().
Bye,
bearophile
More information about the Digitalmars-d
mailing list