Program size, linking matter, and static this()

Trass3r un at known.com
Fri Dec 16 13:53:28 PST 2011


Am 16.12.2011, 22:45 Uhr, schrieb Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org>:

> On 12/16/11 3:38 PM, Trass3r wrote:
>> A related issue is phobos being an intermodule dependency monster.
>> A simple hello world pulls in almost 30 modules!
>> And std.stdio is supposed to be just a simple wrapper around C FILE.
>
> In fact it doesn't (after yesterday's commit). The std code in hello,  
> world is a minuscule 3KB. The rest of 218KB is druntime.

Yep, the 30 modules is a measure I took before that commit.

> Once we solve the static constructor issue, function-level linking  
> should take care of pulling only the minimum needed.

Also by pulling in I just meant the imports.
But the planned lazy semantic analysis should improve the situation.


More information about the Digitalmars-d mailing list