From owner-cvs-all Tue Jun 26 11:23:31 2001 Delivered-To: cvs-all@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id B03F837B407; Tue, 26 Jun 2001 11:23:23 -0700 (PDT) (envelope-from dillon@earth.backplane.com) Received: (from dillon@localhost) by earth.backplane.com (8.11.3/8.11.2) id f5QINNM26741; Tue, 26 Jun 2001 11:23:23 -0700 (PDT) (envelope-from dillon) Date: Tue, 26 Jun 2001 11:23:23 -0700 (PDT) From: Matt Dillon Message-Id: <200106261823.f5QINNM26741@earth.backplane.com> To: "Jonathan Lemon Alfred Perlstein" Cc: Poul-Henning Kamp , "Brian F. Feldman" , Mike Silbersack , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org, jlemon@FreeBSD.org, bmilekic@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet tcp_input.c tcp_output.c tcp_subr.c tcp_timer.c tcp_usrreq.c tcp_var.h References: <200106261707.f5QH70k41274@green.bikeshed.org> <75438.993576676@critter> <20010626123610.M64836@sneakerz.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :... :> some particular case of allocation you need the speed of the :> optimized bzero(). :> :> But if you need the optimized bzero() that bad, what are you :> doing calling malloc in the first place ? : :We could put the test for size in the macro portion then deciding :to M_ZERO or not along with which version would be optimized out :by the compiler for constants. : :-Alfred Yah, but I'm not sure its worth the effort to inline-optimize malloc() if prezeroing is added. I can see the advantage of optimizing stand-alone bzero() calls, but inlining certain cases of malloc(M_ZERO) will bloat the codebase relative to malloc(M_ZERO) (not relative to the bzero that used to be there, but the code shrink might be more significant). Plus there is no performance advantage over an optimized zeroing and malloc(M_ZERO) being able to obtain a pre-zerod block. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message