Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
February 07, 2011 [phobos] Why did the exe size just increase by 170K since dmd2.051? | ||||
---|---|---|---|---|
| ||||
import std.stdio; void main() { writefln("Hello, world!"); } File size in Kb, Windows. 1.000 100 K 1.020 113 K 1.041 331 K 1.066 340 K 1dev 341 K 2.000 114 K 2.020 127 K 2.040 230 K 2.051 297 K 2dev 468 K ---- !!!!!!! |
February 07, 2011 [phobos] Why did the exe size just increase by 170K since dmd2.051? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don Clugston | Better question: What's with the persistent upward trend? On Mon, Feb 7, 2011 at 10:56 AM, Don Clugston <dclugston at googlemail.com>wrote: > import std.stdio; > void main() { writefln("Hello, world!"); } > > File size in Kb, Windows. > 1.000 100 K > 1.020 113 K > 1.041 331 K > 1.066 340 K > 1dev 341 K > > 2.000 114 K > 2.020 127 K > 2.040 230 K > 2.051 297 K > 2dev 468 K ---- !!!!!!! > _______________________________________________ > phobos mailing list > phobos at puremagic.com > http://lists.puremagic.com/mailman/listinfo/phobos > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20110207/0eb89995/attachment.html> |
February 07, 2011 [phobos] Why did the exe size just increase by 170K since dmd2.051? | ||||
---|---|---|---|---|
| ||||
Posted in reply to David Simcha | On Mon, Feb 7, 2011 at 8:15 AM, David Simcha <dsimcha at gmail.com> wrote: > Better question:? What's with the persistent upward trend? http://d.puremagic.com/issues/show_bug.cgi?id=2254 |
February 07, 2011 [phobos] Why did the exe size just increase by 170K since dmd2.051? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don Clugston | compile with the -map option.
tl,dr: everything in Phobos/Druntime references everything else.
Don Clugston wrote:
> import std.stdio;
> void main() { writefln("Hello, world!"); }
>
> File size in Kb, Windows.
> 1.000 100 K
> 1.020 113 K
> 1.041 331 K
> 1.066 340 K
> 1dev 341 K
>
> 2.000 114 K
> 2.020 127 K
> 2.040 230 K
> 2.051 297 K
> 2dev 468 K ---- !!!!!!!
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
>
>
|
February 07, 2011 [phobos] Why did the exe size just increase by 170K since dmd2.051? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Monday, February 07, 2011 14:30:18 Walter Bright wrote:
> compile with the -map option.
>
> tl,dr: everything in Phobos/Druntime references everything else.
Doing stuff like removing eponymous templates from the binary (since all you relaly need is the result, not the template instantiation) would likely help.
- Jonathan M Davis
|
February 07, 2011 [phobos] Why did the exe size just increase by 170K since dmd2.051? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis |
Jonathan M Davis wrote:
> On Monday, February 07, 2011 14:30:18 Walter Bright wrote:
>
>> compile with the -map option.
>>
>> tl,dr: everything in Phobos/Druntime references everything else.
>>
>
> Doing stuff like removing eponymous templates from the binary (since all you relaly need is the result, not the template instantiation) would likely help.
>
>
I'm sorry to bang the drum on this, but the very first step is to generate the .map file using the -map switch. Then you *know* what is taking up space in the executable. Otherwise, you're doing no better than guessing at why Bob's credit card bill is high without ever looking at his visa statement.
|
February 07, 2011 [phobos] Why did the exe size just increase by 170K since dmd2.051? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Monday, February 07, 2011 15:16:46 Walter Bright wrote:
> Jonathan M Davis wrote:
> > On Monday, February 07, 2011 14:30:18 Walter Bright wrote:
> >> compile with the -map option.
> >>
> >> tl,dr: everything in Phobos/Druntime references everything else.
> >
> > Doing stuff like removing eponymous templates from the binary (since all you relaly need is the result, not the template instantiation) would likely help.
>
> I'm sorry to bang the drum on this, but the very first step is to generate the .map file using the -map switch. Then you *know* what is taking up space in the executable. Otherwise, you're doing no better than guessing at why Bob's credit card bill is high without ever looking at his visa statement.
True. But it _is_ a known issue that various detrius from the compilation process gets left in the resulting binary. How much space it takes up is an open question. It could be that it's a very small portion in any binary, but it _is_ something that should be fixed if we're looking to trim down the size of binaries.
Personally, while I don't particularly like the idea of useless stuff ending up in a binary, I don't much care about the increasing executable size. Your typical D executable could be 5mb for all I care. My first reaction to people complaining about the size of D binaries is that they're being overly picky. But maybe at least some of them have use cases where it actually matters. I sure don't though. A small binary might be nice, but it's far from critical in any situation that I typically deal with.
But yes. If you want to really know why the binaries are getting larger, looking at the results of -map is the kind of thing that you'd really need to do.
- Jonathan M Davis
|
Copyright © 1999-2021 by the D Language Foundation