Programs in D are huge

Salih Dincer salihdb at
Tue Aug 16 10:06:39 UTC 2022

On Tuesday, 16 August 2022 at 08:25:18 UTC, Diego wrote:
> after a compilation with these flags `dmd -de -w empty.d` i 
> have an executable of 869KiB
> It seams huge in my opinion for an empty program
> What are the best practices to reduce the size?

If compile speed and verbose error codes are not important, use 
ldc2 with the -O1 parameter. There is also strip for Linux. For 
example, a simple program:

LCD2+strip: 138.5KB.
DMD: 1.9 MB.

SDB at 79

More information about the Digitalmars-d-learn mailing list