Compile time performance for metaprogramming is somewhat inconsistent

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Thu Mar 3 11:41:49 PST 2016


On 3/2/16 9:33 PM, maik klein wrote:
> On Thursday, 3 March 2016 at 02:26:09 UTC, cym13 wrote:
>> On Thursday, 3 March 2016 at 02:03:01 UTC, maik klein wrote:
>>> Consider the following code
>>>
>>> void main()
>>> {
>>>     import std.stdio;
>>>     import std.range: iota, join;
>>>     import std.algorithm.iteration: map;
>>>     import std.conv: to;
>>>     import std.meta: aliasSeqOf, staticMap, AliasSeq;
>>>     enum types = "AliasSeq!(" ~ iota(0,10000).map!(i =>
>>> to!string(i)).join(",") ~ ")";
>>>     alias t = AliasSeq! (mixin(types));
>>>     //alias t1 = aliasSeqOf!(iota(0, 10000));
>>> }
>>>
>>> [...]
>>
>> As often, compiler-version-flags please?
>
> default dub.sdl and `dub build` with dmd v2.070

Try dub build -b release

-Steve


More information about the Digitalmars-d mailing list