[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Eliminating static binaries (Was: Unwanted RPM dependencies)



Patrice Dumas wrote:
On Wed, Jun 06, 2007 at 10:04:59AM +0200, Denis Leroy wrote:
Are you sure? For little apps, linking dynamically leads to a loss in
performance in both size and speed.
That's a very questionable statement, and may only be true under very unusual conditions (such as: the linked dyn libraries are never shared with other executables). I don't see how the run-time execution could technically be slower, outside of the start-up time.

Even if dyn libraries are shared, the code that is needed to perform the
link may add more to the executable. You can try with a simple 'hello
world' that use printf.

But that penalty is dwarfed by the extra cache misses caused by the larger cache footprints of a statically linked executable. I'm sure it's possible to come up with a counter example, but it's likely to be an unusual corner case (as least as far as glibc is concerned), or something that's simply not a real world example.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]