[phobos] std.all
Steve Schveighoffer
schveiguy at yahoo.com
Tue Jun 8 13:50:58 PDT 2010
One further aspect, which is more of a compiler limitation, but should also be taken into account, including modules without using anything from them increases executable size. For example, compiling with the sample std.all on the newsgroup and the simple hello world program produces an executable twice the size of the same program that just imports std.stdio.
Another issue with this, I think any static constructors that are thread local will be run when you create new threads, even if you never use the module!
-Steve
----- Original Message ----
> From: Andrei Alexandrescu <andrei at erdani.com>
> To: Discuss the phobos library for D <phobos at puremagic.com>
> Sent: Tue, June 8, 2010 4:34:24 PM
> Subject: Re: [phobos] std.all
>
> On 06/08/2010 03:18 PM, Walter Bright wrote:
>
>
> Andrei
> Alexandrescu wrote:
>> Actually I've generated std.all myself and
> experimented with it
>> (attached). The parse time with rdmd is larger
> than with individual
>> modules, but not
> annoying.
>>
>>
>
> The parse time will invariably
> grow as phobos grows. I expect std.all
> will become the preferred method
> of using D. The problems are:
>
> 1. People will come to expect
> std.all to have everything and the kitchen
> sink in it, so we're
> stuck.
>
> 2. People will inevitably do compile speed benchmarks
> with std.all. And
> then we'll suck.
>
> So I say "no" to
> std.all.
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. So we're talking about a very
>
small margin: 380ms.
Even if Phobos doubles in size (!), we're
> looking at meager increases in
compile time.
Also, let's not do the
> mistake of just taking one aspect of the problem
into account. std.all does
> have huge advantages, and the fact that we
can afford it will be noted and
> appreciated.
Andrei
_______________________________________________
phobos
> mailing list
> href="mailto:phobos at puremagic.com">phobos at puremagic.com
http://lists.puremagic.com/mailman/listinfo/phobos
More information about the phobos
mailing list