Program size, linking matter, and static this()

Somedude lovelydear at
Sat Dec 17 10:34:13 PST 2011

Le 16/12/2011 22:45, Andrei Alexandrescu a écrit :
> 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.
> Once we solve the static constructor issue, function-level linking
> should take care of pulling only the minimum needed.
> One interesting fact is that a lot of issues that I tended to take
> non-critically ("templates cause bloat", "intermodule dependencies cause
> bloat", "static linking creates large programs") looked a whole lot
> differently when I looked closer at causes and effects.
> Andrei

Fantastic ! :)

More information about the Digitalmars-d mailing list