Generated binary size
Dicebot
public at dicebot.lv
Fri Sep 13 06:06:28 PDT 2013
On Friday, 13 September 2013 at 12:51:13 UTC, Johannes Pfau wrote:
> It seems like the gdc compiled program has more symbols for some
> reason:
>
> ----------
> nm hello-dmd --defined-only | wc -l
> 3834
> nm hello-gdc --defined-only | wc -l
> 5451
> ----------
>
> Here's a "diff" of the defined symbols:
> https://gist.github.com/jpf91/6550247
Yep and `--gc-sections` gets it down to:
```
$ nm hello-gdc --defined-only | wc -l
3894
```
I was curious though what kind of code gen optimization dmd uses
here (as opposed to gdc) as simple experiments show that it does
not remove unused template instances.
More information about the D.gnu
mailing list