Huge output size for simple programs

Daniel N via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Sep 11 04:32:15 PDT 2015


On Friday, 11 September 2015 at 11:15:33 UTC, NX wrote:
> 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
>
>

If you care about binary sizes, use ldc2:
ldc 225544 bytes (stripped + writeln)
ldc 175736 bytes (stripped + puts)

with tricks you can get lower, but that's out of the box...


More information about the Digitalmars-d-learn mailing list