Thread overview
Hello World -- 112K???
Jun 01, 2007
gedumer
Jun 01, 2007
Sean Kelly
Jun 01, 2007
BCS
Jun 01, 2007
gedumer
June 01, 2007
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.
June 01, 2007
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
June 01, 2007
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


June 01, 2007
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.
June 01, 2007
"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 ;)