From owner-p4-projects@FreeBSD.ORG Fri Jul 25 11:37:47 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2C13A37B404; Fri, 25 Jul 2003 11:37:47 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D365337B401 for ; Fri, 25 Jul 2003 11:37:46 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7658B43F75 for ; Fri, 25 Jul 2003 11:37:46 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id 5FD642A7EA; Fri, 25 Jul 2003 11:37:46 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Bosko Milekic In-Reply-To: <20030722093151.GC58118@technokratis.com> Date: Fri, 25 Jul 2003 11:37:46 -0700 From: Peter Wemm Message-Id: <20030725183746.5FD642A7EA@canning.wemm.org> cc: Perforce Change Reviews Subject: Re: PERFORCE change 34815 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2003 18:37:48 -0000 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