From owner-freebsd-current Thu Nov 23 13:48:35 2000 Delivered-To: freebsd-current@freebsd.org Received: from palrel3.hp.com (palrel3.hp.com [156.153.255.226]) by hub.freebsd.org (Postfix) with ESMTP id 1171437B4CF for ; Thu, 23 Nov 2000 13:48:34 -0800 (PST) Received: from adlmail.cup.hp.com (adlmail.cup.hp.com [15.0.100.30]) by palrel3.hp.com (Postfix) with ESMTP id 43EA771B; Thu, 23 Nov 2000 13:48:30 -0800 (PST) Received: from cup.hp.com (p1000180.nsr.hp.com [15.109.0.180]) by adlmail.cup.hp.com (8.9.3 (PHNE_18546)/8.9.3 SMKit7.02) with ESMTP id NAA16676; Thu, 23 Nov 2000 13:48:29 -0800 (PST) Message-ID: <3A1D90AD.FE0CC1CF@cup.hp.com> Date: Thu, 23 Nov 2000 13:48:29 -0800 From: Marcel Moolenaar Organization: Hewlett-Packard X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Julian Elischer Cc: current@FreeBSD.ORG Subject: Re: slight improvement in locore.s? References: <3A1D47C6.D35464F0@elischer.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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