Date: Sat, 23 Jun 2001 10:30:23 -0700 (PDT) From: Matt Dillon <dillon@earth.backplane.com> To: "Jonathan Lemon <jlemon@flugsvamp.com> Alfred Perlstein" <bright@sneakerz.org>, Mike Silbersack <silby@FreeBSD.ORG>, 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 Message-ID: <200106231730.f5NHUNd73058@earth.backplane.com> References: <200106230321.f5N3Llv09510@freefall.freebsd.org> <20010623102801.F57058@sneakerz.org> <200106231633.f5NGXqp72502@earth.backplane.com> <20010623120531.V33375@prism.flugsvamp.com> <200106231718.f5NHIAm72921@earth.backplane.com> <20010623122230.W33375@prism.flugsvamp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
:> :-- :> :Jonathan :> :> Ah. Hmm. It's a toss-up. The inline calculations are going to be :> about the same as a (cache hit) read, so I suppose we could keep :> in_pseudo(). The bzero() is another matter, however. : :I'm not actually sure if inlining in_pseudo() is a win or not, this :probably should be measured. The bzero() should probably be removed; :as the comment notes, it is overkill and may not be needed. In any :case, it is just zeroing the ip strcucture; an explicit zero assignment :is probably going to be faster. :-- :Jonathan Yes, there's no question bzero() should be removed. The subroutine overhead alone, never mind it doing anything, is enough to blow away any benefit. Hence: Test3 - man load w/ptrs 35.73 nS/loop Test4 - mlptrs & bzero 161.60 nS/loop Ouch! Of course, us old timers also see the fact that the entire subroutine runs dozens of instructions in less then a microsecond and say "ooooh, cool...". -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106231730.f5NHUNd73058>