From owner-cvs-all Tue Jun 26 10:31:38 2001 Delivered-To: cvs-all@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 8DA4D37B406; Tue, 26 Jun 2001 10:31:31 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.3/8.11.3) with ESMTP id f5QHVGn75440; Tue, 26 Jun 2001 19:31:17 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: "Brian F. Feldman" Cc: "Jonathan Lemon Alfred Perlstein" , Mike Silbersack , Matt Dillon , 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 In-Reply-To: Your message of "Tue, 26 Jun 2001 13:07:00 EDT." <200106261707.f5QH70k41274@green.bikeshed.org> Date: Tue, 26 Jun 2001 19:31:16 +0200 Message-ID: <75438.993576676@critter> From: Poul-Henning Kamp 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 In message <200106261707.f5QH70k41274@green.bikeshed.org>, "Brian F. Feldman" w rites: >Well, I don't get exactly how it would be optimized more than it is now >because it won't be able to take advantage of these "smaller" bzero()s... >unless... what about making malloc() an inline that checks M_ZERO and uses >the new constant-bzero() on sufficiently small sizes after calling malloc >without the M_ZERO? I'm pretty certain GCC would optimize that fine, and >that would buy us the faster-constant-sized-bzero back from the M_ZERO >optimization. I seriously doubt you'd get any optimization out of doing it in general. It would probably be better to _not_ use M_ZERO if in 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 ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message