Binary size with dmd 2.042

bearophile bearophileHUGS at lycos.com
Sun Apr 4 10:54:19 PDT 2010


Using dmd 2.042 if I compile on Windows this program:

import std.stdio;
void main() {}

The binary is 195_612 bytes. And its asm is 38_574 bytes, it contains tons of functions like:
_D6object28__T16AssociativeArrayTAyaTiZ16AssociativeArray4keysMFNdZAAya


While if I compile this one-line program:

void main() {}


The binary is now bigger, 242_716 bytes, but its asm is much smaller, just 1_007 bytes, it contains just the _Dmain, moduleinfo and little more.


I don't understand.

Bye,
bearophile



More information about the Digitalmars-d mailing list