Big executable?

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu Oct 14 17:19:49 PDT 2010


I had an odd thing going while coding a D app. It only had a few
thousand lines of code, but at some point the more code I added the
executable would get smaller, until I would add even more code and
then it would finally expand again. I guess this has something to do
with DMD optimizations.


On 10/6/10, Andre Tampubolon <andre at lc.vlsm.org> wrote:
> Hi,
>
> I just started learning D (my background is C, anyway).
>
> I compiled this simple code using DMD 2.049 (dmd -O -release test1.d) :
> import std.stdio;
>
> void main()
> {
>      writefln("%s World", "Hello");
> }
>
> The final executable size is about 300 KB. Isn't that a bit huge,
> considering the same code compiled using C or Pascal compiler will give
> smaller executable? So I tried to look at the *.map, and apparently the
> D runtime pulls a lot of stuff. I am just wondering, anyway.
>


More information about the Digitalmars-d mailing list