A New Import Idiom`
jmh530 via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Mon Feb 13 08:17:49 PST 2017
On Monday, 13 February 2017 at 15:04:53 UTC, Daniel N wrote:
>
> Probably, please help measuring your idea and post it here. I
> intentionally chose a test made by someone else to avoid
> biasing from my part. It was the only test I found at time of
> writing.
The first time I did it, I got a ~60% decline in compilation
speed and binary size. I called dmd without any extra settings
after making the above change (and adding a main function). It
seemed weird that it's even better than in his comparison. Maybe
he had used some settings I hadn't.
So I tried it again comparing all three versions on my machine.
This time I didn't notice a difference in compilation speed or
binary size between the version with
import std.datetime;
import std.traits;
and the one with
import std.datetime : SysTime;
import std.traits : isIntegral;
So I'm not sure it matters.
More information about the Digitalmars-d-announce
mailing list