Am Tue, 02 May 2017 20:53:50 +0000 schrieb Moritz Maxeiner <[email protected]>:
> On Tuesday, 2 May 2017 at 19:34:44 UTC, Marco Leise wrote: > > > > I see what you're doing there, but your last point is wishful > > thinking. Dynamically linked binaries can share megabytes of > > code. Even Phobos - although heavily templated - has proven to > > be very amenable to sharing. For example, a "Hello world!" > > program using `writeln()` has these sizes when compiled with > > `dmd -O -release -inline`: > > > > static Phobos2 : 806968 bytes > > dynamic Phobos2 : 18552 bytes > > > > That's about 770 KiB to share or 97.7% of its total size! > > Awesome! > > Is all of that active code, or is some of that (statically > knowable) never getting executed (as in could've been removed at > compile/link time)? I guess David gave you the answer. So it's just 95.4% of its total size. :p By the way, is the fully dynamic linking version possible with ldc2 now as well ? -- Marco
