Adam D. Ruppe destructionator at
Thu Feb 2 20:43:34 PST 2012

On Friday, 3 February 2012 at 04:23:34 UTC, Marco Leise wrote:
> I have seen a flag in Linux for hosting virtual machines, but 
> it must be an enormous overhead to check every executable page 
> or every executable file on the file system for duplicates.

tbh I haven't benchmarked it, but one of the cloud
providers I worked on used it on Solaris, and we had
a good experience.

> great, but the most spread OSes today and in the foreseeable 
> future wont have filesystems that do something like automatic 
> hardlinks of duplicate pages in executables.

Regardless, most computers today aren't exactly
counting their kilobytes either. (And those that are
don't multitask much anyway.)

Phobos, in a typical D program, consumes a few hundred
kb. Maybe if you're running 1,000 D processes at once will
it become a problem... but that's not a realistic scenario.

Distributing standalone D programs, or having D programs that
use different versions of Phobos *is* something we face. With
static linking, this isn't a problem. It's mindlessly easy.

> Let's imagine the library to link against against was Gtk. 
> Would you want every binary download on the internet to include 
> libraries of that size?

Yes, actually. I'd rather download a 10 MB executable that
*actually works* than have to download a separate library,
and hope I get the right version.

(And 10 MB is probably an overestimate! I've used statically
linked Qt apps that come in at only about 6 MB.)

There's times when dynamic linking is a good call. Core
operating system libraries, plugins, stuff like that.

But, Phobos isn't one of them, and I doubt it ever will be.

More information about the Digitalmars-d mailing list