Object size?

Hailey Nelson kovavis643 at bflcafe.com
Thu Nov 28 07:34:47 UTC 2024


On Saturday, 2 March 2024 at 04:33:02 UTC, [basketball 
stars](https://basketball-stars.io) wrote:
> I'm early days on dlang, and found a small HTTP server 
> "serverino".  I have it built, linked with a test program, and 
> running.  But the executable size is enormous.  For 405 
> statements, it has a text size of 712k bytes.  Whoof.  Is this 
> normal?  I'm using ldc2 version 1.30.0.
>
> Thanks!
> Andy Valencia

You could reply with:

Hi Andy, it's fairly normal for D executables to be larger due to 
runtime and template bloat, but you can try using `ldc2 -Os` or 
`--gc-sections` to optimize for size, or explore stripping debug 
symbols with `strip`.


More information about the digitalmars-d-ldc mailing list