ranges in phobos increase exe size#4754
Conversation
|
:-(
Well you don't use datetime at all, so we need to find out how to keep that dead code out of the binary. |
ranges in phobos increase exe size
|
It may have been an accumulation of things that this change just put past the trigger. |
|
--gc-sections seems to be quite an effective way to work around the codegen issues. I can't easily check with the 2.068 Phobos on LDC right now, but on 2.067 the Linux x86_64 executable for that test is only 30% the size of DMD's. |
|
We had little to no effect of gc-sections with dmd, mostly because it already uses multilibs. |
|
Well, all I'm saying is that LDC's executable is much smaller, and --gc-sections certainly contributes to that. |
|
Object.factory in hindsight was a mistake. It should only work with classes marked with |
|
Might make an interesting story for the next release, though export still needs a lot of fixes. Also there are more important topics than binary size. |
Still about the same ratio for 2.068 (with both linked to shared phobos library) (for a simple app that uses some template utilities) void main ()
{
import std.stdio, std.algorithm;
writeln([ 1, 2, 3 ].map!(a => 2*a));
} |
not much to be done about that.