The D ecosystem in Debian with free-as-in-freedom DMD

Marco Leise via Digitalmars-d digitalmars-d at puremagic.com
Tue May 2 16:27:28 PDT 2017


Am Tue, 02 May 2017 20:53:50 +0000
schrieb Moritz Maxeiner <moritz at ucworks.org>:

> 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



More information about the Digitalmars-d mailing list