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 ...
David Schultz
das at FreeBSD.ORG
Fri Apr 4 13:53:09 PST 2003
Thus spake Dag-Erling Smørgrav <des at ofug.org>:
> David Schultz <das at 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.
More information about the cvs-src
mailing list