On 3/22/07, oryann9 <[EMAIL PROTECTED]> wrote:
--- Chas Owens <[EMAIL PROTECTED]> wrote:

> On 3/22/07, oryann9 <[EMAIL PROTECTED]> wrote:
> snip
> > Am I linked to libc.a?
> snip
> >    libc=/usr/lib/libc.a, so=dll, useshrplib=true,
> libperl=libperl.a
> snip
>
> It looks like it.  My perl says
>     libc=/lib/libc-2.4.so, so=so, useshrplib=true,
> libperl=libperl.so.5.8.8
>
> it looks like you are using ActiveState Perl
> (so=dll), so you might
> try asking them.
>

yes I am using active state but that output was from
cygwin.
However this is NOT using libc.a on an HPUX.

[snip]

So in version 5.8 is this performance gain still true?

thx!


That really depends on your environment. For any C program, there is
an absolute speed gain if you take a dynamically linked library and
replace it with a statically linked one. But applications don't run in
a vacuum, and dynamic linking has become popular for a reason. If
you're running, say, 100 instances of Perl and other processes that
all link to libc, you probably get more performance gain out of not
having 100 simultaneous copies of libc resident in memory than out of
the marginal gains to any particular process's runtime that you would
get from static linking, particularly if it causes you to swap more.

On the other hand, if you have an environment running a fairly small
number of processes or running a large number of short-lived
processes, static linking can be beneficial as long as sufficient
resources are available. Perl running in mod_perl or CGI environments
is often a good candidate for static linking, although you'll want to
look at the number of simultaneous Perl interpreters you have running
at peak times, multiply that by the size of your compiled libc, and
make sure you have room in memory for it along with everything else.
Again, though: if static-linking degrades overall system performance,
you haven't gained anything.

This really isn't a Perl question, though. If you have questions about
dynamic vs. static linking, and why you might want to do one or the
other, you should probably pick up a good book on C and/or the C
compiler on your system.

HTH,

-- jay
--------------------------------------------------
This email and attachment(s): [  ] blogable; [ x ] ask first; [  ]
private and confidential

daggerquill [at] gmail [dot] com
http://www.tuaw.com  http://www.downloadsquad.com  http://www.engatiki.org

values of β will give rise to dom!

Reply via email to