Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: cherkus@fastball.unimaster.com (Dave Cherkus)
Subject: Re: better performance through static linking?
Date: Sat, 16 Oct 1993 17:21:05 GMT	[thread overview]
Message-ID: <CF02v6.8zs@mv.mv.com> (raw)
In-Reply-To: CEyGun.Cov@cc.swarthmore.edu

In article <CEyGun.Cov@cc.swarthmore.edu>, hirai@cc.swarthmore.edu (Eiji Hirai) writes:
|> If I compile my heavily used programs with "LDFLAGS = -non_shared" (i.e.
|> static-ly link my object files), will this have any speed improvements when
|> I execute the binary?  Is this a useless exercise or will I gain something?

It depends.  Small, frequently executed programs will be faster linked
non-shared.  This is because the startup cost of shared executables is
greater than the cost of nonshared executables.  Another cost
associated with shared libraries is the cost of mapping the entire set
of libraries into your address space when you might only be using a
tiny subset of the code in these libraries.  In some cases reducing
the virtual size of the process is a performance win.  Of course,
having the shared libraries reduces disk space usage, increases
maintainability and allows the library code segments to be shared
at run time.

----
Dave Cherkus          UniMaster, Inc.         cherkus@unimaster.com 


  reply	other threads:[~1993-10-16 17:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-10-15 20:27 better performance through static linking? Eiji Hirai
1993-10-16 17:21 ` Dave Cherkus [this message]
1993-10-16 23:46   ` Eiji Hirai
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox