www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Hello World -- 112K???

reply gedumer <gedumer yahoo.com> writes:
Why are exe's so large with D? 112K for Hello World seems a bit high. I
compiled it with no debug info and -O optimization.
Jun 01 2007
next sibling parent Sean Kelly <sean f4.ca> writes:
gedumer wrote:
 Why are exe's so large with D? 112K for Hello World seems a bit high. I
compiled it with no debug info and -O optimization.

TypeInfo, largely. Executable size has come up a few times in the past. Read the archives for posts by "kris" to track them down, both here and in either D.bugs or D.announce (I can't remember where the other threads were located). If it helps, "hello.exe" used to be around 70k. The jump above 100k occurred within the past six months. Sean
Jun 01 2007
prev sibling next sibling parent BCS <ao pathlink.com> writes:
Reply to gedumer,

 Why are exe's so large with D? 112K for Hello World seems a bit high.
 I compiled it with no debug info and -O optimization.
 

IIRC phobos ends up being staticly linked and (I think) has a fare bit of stuff that under C ends up being part of the C standard library, which is offten in a .dll/.so
Jun 01 2007
prev sibling parent reply gedumer <gedumer yahoo.com> writes:
gedumer Wrote:

 Why are exe's so large with D? 112K for Hello World seems a bit high. I
compiled it with no debug info and -O optimization.

Thanks... I did manage to track many of the other posts down re: EXE size. I suppose I now understand the reason. I wander if it's a matter of further development to ultimately reduce the exe's or will they continue to grow? Only time will tell, I guess.
Jun 01 2007
parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"gedumer" <gedumer yahoo.com> wrote in message 
news:f3q8h9$1q9l$1 digitalmars.com...
 gedumer Wrote:

 Why are exe's so large with D? 112K for Hello World seems a bit high. I 
 compiled it with no debug info and -O optimization.

Thanks... I did manage to track many of the other posts down re: EXE size. I suppose I now understand the reason. I wander if it's a matter of further development to ultimately reduce the exe's or will they continue to grow? Only time will tell, I guess.

Well if it's any consolation, it's a fixed overhead. I doubt that most of the time you're going to be making programs as small as a hello world, so the ~100K overhead won't mean much when your EXE is 5MB. It's the consequence of using a language that provides you with useful capabilities ;)
Jun 01 2007