Huge output size for simple programs
NX via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Sep 11 04:15:31 PDT 2015
I compile a simple hello world program in C and the results:
hello_world.o -> 1.5 KB
hello_world (linux executable) -> 8.5 KB
Then I compile a simple hello world program in D (using DMD) and
the results:
hello_world.o -> 9.3 KB
hello_world (linux executable) -> 575.9 KB
Then I compile a simple hello world program in D (using GDC) and
the results:
hello_world.o -> 24.6 KB
hello_world (linux executable) -> 13 MB !!!
What's the reason for that? What makes D applications so much
bloated?
Is this because whole GC implementation code is injected into
executable or maybe libphobos.a being statically linked or is
this because TypeInfo* ModuleInfo* stuff?
More information about the Digitalmars-d-learn
mailing list