Big executable?
Jonathan M Davis
jmdavisProg at gmx.com
Wed Oct 6 00:14:36 PDT 2010
On Tuesday 05 October 2010 23:12:08 Andre Tampubolon 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.
People complain about that from time to time, and I believe that some work has
been done to reduce the executable size, but the reality of the manner is that
the plumbing that comes with druntime and the GC is going to take up some space,
even if you don't use much of it. However, it will likely get dwarfed by the
rest of your code if you write a decent size program, so it really won't matter
much with real programs. It's just that the minimum size is a bit larger than
some would like.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list