compiled code file size
Adam D. Ruppe
destructionator at gmail.com
Fri Sep 20 11:07:40 PDT 2013
On Friday, 20 September 2013 at 17:26:29 UTC, Duke Normandin
wrote:
> Now that I know _why_ , is there a way to shave tons off those
> executables? Any optimization possible?
Yes, you can get D programs down very small - I've gone as low as
3 KB before on Linux (100% statically linked, doesn't even depend
on the C runtime), where the executables are generally a little
larger than on Windows.
BUT, the runtime code is there for a reason. Stripping it out
means you lose D features, can't use most D libraries, and have
to know druntime's implementation fairly well.
So it isn't something you really want to do.
Why is size important to you though? 140 KB really isn't bad, and
will probably shrink to a small percentage of the total once you
write a real program that's more than just hello world.
More information about the Digitalmars-d
mailing list