Filesize of D binaries?

Mike Simons ixulai at gmail.com
Sat Jan 6 04:50:58 PST 2007


Someone recently pointed out to me that a simple hello world sample that only
imports std.stdio and prints a single line to console compiles to a rather
hefty 250k! The program was 7 lines long! The compiled C equivalent is 7k.

I also tried compiling one of the samples from the site which was rouhghly 150
lines and that ended up being 400k.

I'm using gdc on linux.
Is there something I'm missing (i.e. is the compiler chucking in stuff I don't
need?) or is this for real?
Is it just an issue with immature compilers?

I know D has to stick RTTI and GC stuffs in my binary, but what else is going
in there?



More information about the Digitalmars-d mailing list