PERFORCE change 34815 for review

Peter Wemm peter at wemm.org
Fri Jul 25 11:37:48 PDT 2003


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 at 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 at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5



More information about the p4-projects mailing list