Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jul 2003 11:37:46 -0700
From:      Peter Wemm <peter@wemm.org>
To:        Bosko Milekic <bmilekic@technokratis.com>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 34815 for review 
Message-ID:  <20030725183746.5FD642A7EA@canning.wemm.org>
In-Reply-To: <20030722093151.GC58118@technokratis.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Bosko Milekic wrote:
> 
> 
> On Mon, Jul 21, 2003 at 08:47:35PM -0700, Peter Wemm wrote:
> > http://perforce.freebsd.org/chv.cgi?CH=34815
> > 
> > Change 34815 by peter@peter_hammer on 2003/07/21 20:47:23
> > 
> > 	mb_alloc and mb_free are way too big to inline
> 
>   They're only inlined in some local routines.  Some care was taken to
>   keep the local routines' size not too bad by only inlining them in
>   there once or twice at worse.  In retrospect, though, this could have
>   been done better, but out-of-lining them is not the best solution.
> 
>   P.S.: How expensive, relatively, is a function call on the hammer?  I
>   seem to recall the alpha had a relatively higher cost (when compared
>   to i386) for typical function calls.

Mixed.  Function calls to small leaf functions are Really Fast(TM).

The bigger the calling and called functions, the higher the cost, because
of the way the context saves work.  The register space is about 60%
caller-saved.  Sometimes you can get away with not having to save any
registers at all across a function call, *if* the conditions are right.
And because function args are passed in registers rather than on the memory
stack, that speeds things up in the usual case.

Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5



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