digitalmars.D - Binary size with dmd 2.042
- bearophile (11/11) Apr 04 2010 Using dmd 2.042 if I compile on Windows this program:
- Walter Bright (3/4) Apr 04 2010 If you want to find out what is linked in, compile with -map and look at...
- anonymous troll (2/20) Apr 05 2010 Does the binary size matter these days? The 1..2 TB drives bring the bes...
- Robert Clipsham (4/5) Apr 05 2010 I believe the issue wasn't with binary size, but rather with why
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
Apr 04 2010
bearophile wrote:I don't understand.If you want to find out what is linked in, compile with -map and look at the linker .map file. There's nothing mysterious about it.
Apr 04 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.
Apr 05 2010
On 06/04/10 00:44, anonymous troll wrote: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.I believe the issue wasn't with binary size, but rather with why including std.stdio miraculously made the binary lose weight, when you'd expect it to gain more.
Apr 05 2010