Date: Thu, 23 Nov 2000 13:48:29 -0800 From: Marcel Moolenaar <marcel@cup.hp.com> To: Julian Elischer <julian@elischer.org> Cc: current@FreeBSD.ORG Subject: Re: slight improvement in locore.s? Message-ID: <3A1D90AD.FE0CC1CF@cup.hp.com> References: <3A1D47C6.D35464F0@elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Julian Elischer wrote:
>
> movl $((foo)*PAGE_SIZE), %eax ; \
...
> movl $((foo)*PAGE_SIZE),%ecx ; \
> might it be a very slight optimisation to change this to:
> movl $((foo)*PAGE_SIZE), %eax ; \
> movl %eax, %ecx ; \
...
I don't know to much about the micro-architecture of the x86 family, but
we know that the value of $((foo)*PAGE_SIZE) is cached. So the ld into
%ecx might not take more time than a register copy and if it does, it
can probably be performed in parallel. The register copy however must be
performed before the "addl %esi, %eax", adding to the dependency graph
of %eax and decreasing parallelism on the critical path.
In short: I don't think micro-optimizations should be made without
benchmark results :-)
--
Marcel Moolenaar
mail: marcel@cup.hp.com / marcel@FreeBSD.org
tel: (408) 447-4222
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A1D90AD.FE0CC1CF>
