Re: [dev] Detaolb

From: Kris Maglione <>
Date: Sat, 23 May 2009 14:30:27 -0400

On Sat, May 23, 2009 at 11:24:39PM +1000, Nathan Hutchison wrote:
>But on the other hand, a lot of functions that you might like to have
>inlined will not be, and a lot of functions will be dynamic, when in fact,
>no one is using them, at all.

Statically linked libraries don't do inlining either. Inlined
functions certainly consume more disk and memory space than
their counterparts, but they have nothing to do with linking,
regardless. They're inlined at compile time, not link time. And,
in most cases, the performance impact is negligable (and
sometimes deleterious, when you have a small CPU cache and
reasonable branch prediction). As for dynamic functions that
aren't used, they're certainly a factor, but when the same code
is shared by multitudinous processes (think libc), dynamic
linking wins out in terms of space and load time.

>I'm not providing this as any proof, more as trivia, but plan9 is static
>linked, reasons like dependency hell are listed, it makes the OS its self
>less complicated and the libraries less complicated.
>Plan9 gains code reuse using servers and file systems, which to me, is a
>little better.

You don't want to get into Plan 9 with me.

>So static linking with nice lean code like plan9, but the problem is, we
>wanna use linux and if we want to use expected linux applications, we want
>glibc and we want to use gcc and hell soon enough we have a whole gnu
>toolchain and the advantages are looking sketchy.

There are alternatives. If you want Plan 9 on Unix, use KenCC
and remove the system libc dependencies from Plan 9's libc port.

>I once saw an old linux version patched to compile with tcc, I'd love to see
>a tight staticly linked distro built with this, tcc would see a more
>dramatic performance gain in my imagination. And not having a gcc install
>and the faster compile times is swell.

What's with this fixation on static linking? You can have a
statically linked distro if you want it, but you still haven't
justified it.

Sorry, I've barely even skimmed this email... I've read shorter
PhD theses.

Kris Maglione
One of my most productive days was throwing away 1000 lines of code.
	--Ken Thompson
Received on Sat May 23 2009 - 18:30:27 UTC

This archive was generated by hypermail 2.2.0 : Sat May 23 2009 - 18:36:01 UTC