Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* better performance through static linking?
@ 1993-10-15 20:27 Eiji Hirai
  1993-10-16 17:21 ` Dave Cherkus
  0 siblings, 1 reply; 3+ messages in thread
From: Eiji Hirai @ 1993-10-15 20:27 UTC (permalink / raw)


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?

-- 
hirai@cc.swarthmore.edu (Eiji Hirai) | Unix Geek for Swarthmore College
I don't speak for Swarthmore College | Computing Center, Swarthmore, PA, USA

"I post, therefore I am." -Rene Descartes on Usenet



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: better performance through static linking?
  1993-10-15 20:27 better performance through static linking? Eiji Hirai
@ 1993-10-16 17:21 ` Dave Cherkus
  1993-10-16 23:46   ` Eiji Hirai
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Cherkus @ 1993-10-16 17:21 UTC (permalink / raw)


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 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: better performance through static linking?
  1993-10-16 17:21 ` Dave Cherkus
@ 1993-10-16 23:46   ` Eiji Hirai
  0 siblings, 0 replies; 3+ messages in thread
From: Eiji Hirai @ 1993-10-16 23:46 UTC (permalink / raw)


cherkus@UniMaster.COM writes:
: allows the library code segments to be shared at run time.

If I static link a program which is called many times, with several copies
of the program running at the same time, will I end up eating more memory
since the libraries aren't shared?

In particular, I'm thinking of static linking sendmail and popper (a POP-3
server) for the campus mail server.

-- 
hirai@cc.swarthmore.edu (Eiji Hirai) | Unix Geek for Swarthmore College
I don't speak for Swarthmore College | Computing Center, Swarthmore, PA, USA

"I post, therefore I am." -Rene Descartes on Usenet


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1993-10-16 23:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-10-15 20:27 better performance through static linking? Eiji Hirai
1993-10-16 17:21 ` Dave Cherkus
1993-10-16 23:46   ` Eiji Hirai

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