why simple hello world binary is ~700KB
Gregor Richards
Richards at codu.org
Thu Oct 4 15:18:24 PDT 2007
Sean Kelly wrote:
> Bedros Hanounik wrote:
>> Ok, I tried dmd 2.0 with the same code and got 271KB binary out of it.
>> still huge compared to 6.5KB generated by gcc.
>
> About the smallest "hello world" binary you'll get from a recent version
> of D is 100k. Prior to 1.0, it was possible to get a 70k "hello world"
> program. In every case however, cstdlib is statically linked to the app.
>
>
> Sean
Um, I hope you mean the /D/ stdlib? The C stdlib is never statically linked.
In fact, glibc is incredibly resistant to being statically linked in any
scenario.
- Gregor Richards
More information about the Digitalmars-d
mailing list