Binary size with dmd 2.042

anonymous troll troll at technolo.gy
Mon Apr 5 16:44:53 PDT 2010


bearophile Wrote:

> 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.

Does the binary size matter these days? The 1..2 TB drives bring the best gigabyte / dollar ratio. You can store 10 million such programs on a single drive.



More information about the Digitalmars-d mailing list