Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Nov 2003 19:47:40 +1100
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        gallatin@cs.duke.edu
Subject:   Re: 40% slowdown with dynamic /bin/sh
Message-ID:  <20031125084740.GE76478@server.vk2pj.dyndns.org>
In-Reply-To: <20031125.011734.118629079.imp@bsdimp.com>
References:  <200311242125.13786.sam@errno.com> <20031124.231607.128865107.imp@bsdimp.com> <20031125080155.GC76478@server.vk2pj.dyndns.org> <20031125.011734.118629079.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 25, 2003 at 01:17:34AM -0700, M. Warner Losh wrote:
>True.  However, I get very similar numbers of I change it to
>/usr/bin/true (12% slower).  /bin/sh usually fork+exec things other
>/bin/sh.

That's a more interesting result and more comparable to Drew's test.
It doesn't necessarily invalidate Drew's results - /bin/sh has 3
shared libraries and is locale-aware whereas /usr/bin/test has 1
shared library and doesn't rely on the locale.  /usr/bin/true is also
significantly smaller (implying less relocation requirements).
/bin/sh could reasonably be expected to take longer to startup then
/usr/bin/test.

>Dynamically linked prorgrams tend to be a few percent slower than
>their static counterparts due to PIC code typically being slower than
>non-PIC code.  There's nothing new here.

Except that, on face value, your figures suggested an 11% slowdown
attribute to PIC code - which is way above "a few percent".

>Clearly there are problems to look into, but it isn't the end of the
>world.

Agreed.  I think most people agree that more work needs to be done.  The
arguing seems to be whether the work should be done before or after the
big switch is thrown and how to go about recovering the lost performance.
(And of course one contingent is insisting it be green whilst a different
contingent is insisting that it can't be green and has to be triangular
instead).

Peter



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031125084740.GE76478>