[phobos] std.all

Andrei Alexandrescu andrei at erdani.com
Tue Jun 8 14:03:52 PDT 2010


On 06/08/2010 03:42 PM, Adam Ruppe wrote:
> On 6/8/10, Andrei Alexandrescu<andrei at erdani.com>  wrote:
>> I think there's no reason to become agitated. I measured compile time
>> with three imports and with std.all. The compile time with three imports
>> is 0.44s, and with std.all it's 0.82s.
>
> Curious, what were the three imports? Anecdotally, I find that D2
> compiles just about as fast as D1 (that is, virtually instantly),
> until I import std.stdio. Then, it slows down quite a bit. Still kicks
> the socks off any other compiler out there, but comparatively slow.

import std.algorithm, std.conv, std.stdio;

> No other module seems to have as much of an impact as stdio - if this
> is actually true, and not just me, the speed difference between
> std.all, std.common, or just std.stdio itself may all be fairly
> negligible, so separating them for speed purposes could be futile.
>
>> std.all does have huge advantages, and the fact that we
>> can afford it will be noted and appreciated.
>
> It is quite nice with rdmd indeed.

To me, given D's approach to modularization, import statements are a 
necessary evil. I'm all for std.all.

Andrei


More information about the phobos mailing list