Executable Size

Anders F Björklund afb at algonet.se
Wed May 17 14:40:58 PDT 2006


Gambler wrote:

> I just compiled my firts D program. It is the word count program from some
> exapme on this website. Executable is 80kb. WC program in C is 20kb. My question
> is, is such situation common with D? Or is it just std.file library?

Looks normal... Some reasons are:
1) the code for garbage collection
2) the static linking of Phobos lib

C++ also tends to be a bit larger than C.
(*especially* if you include the std lib)
Is the code size for D really a problem ?

--anders

PS.
For a sample I got:
  12K    hello_c
156K    hello_d
368K    hello_cpp
With GDC on Mac OS X.



More information about the Digitalmars-d mailing list