Date: Fri, 4 Apr 2003 13:53:02 -0800 From: David Schultz <das@FreeBSD.ORG> To: "Dag-Erling =?us-ascii:iso-8859-1?Q?Sm=F8rgrav?=" <des@ofug.org> Cc: Kris Kennaway <kris@obsecurity.org> Subject: Re: cvs commit: src/sys/alpha/alpha support.s src/sys/i386/i386 identcpu.c support.s src/sys/i386/include md_var.h src/sys/i386/isa npx.c src/sys/ia64/ia64 support.s src/sys/powerpc/powerpc bcopy.c src/sys/sparc64/sparc64 support.S ... Message-ID: <20030404215301.GA37335@HAL9000.homeunix.com> In-Reply-To: <xzpn0j6c6m5.fsf@flood.ping.uio.no> References: <200304041729.h34HTtVb027430@repoman.freebsd.org> <20030404173635.GA22147@rot13.obsecurity.org> <20030404182223.GA36706@HAL9000.homeunix.com> <xzpn0j6c6m5.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake Dag-Erling Smørgrav <des@ofug.org>: > David Schultz <das@FreeBSD.ORG> writes: > > BTW, why does this change convert bcopy from a function pointer to > > a function that jumps to the address of a pointer? This looks > > like a net gain in lines of code and a net gain in pipeline > > stalls. Is there something in particular that it makes easier? > > Just code hygiene. There is no such optimization for bzero or any of > the other functions in support.s (copyin, copyout), and it required an > i386-specific declaration in <sys/systm.h>. Of course, if the > consensus is that this micro-optimization is desirable, I'll back out > this part of the patch, but in that case I'll turn the other functions > into pointers as well rather than have a mixed bag. I don't care about the microoptimization if it's actually problematic in some way. I just don't see why calling a function that jumps to the address of a pointer is aesthetically better than calling the pointer in the first place. In any case, it's not a big deal and I probably shouldn't have even bothered to bring it up.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030404215301.GA37335>