June 08, 2010

Andrei Alexandrescu wrote:
> 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;
>

I think the problem with std.stdio is it instantiates a bunch of templates even if nothing is referenced from it. You can see this in the .obj file of:

import std.stdio;
void foo() { }
1 2 3
Next ›   Last »