From owner-freebsd-hackers Mon Jun 5 17:48:29 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from cain.gsoft.com.au (genesi.lnk.telstra.net [139.130.136.161]) by hub.freebsd.org (Postfix) with ESMTP id 5D6E637B683 for ; Mon, 5 Jun 2000 17:48:07 -0700 (PDT) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (doconnor@cain [203.38.152.97]) by cain.gsoft.com.au (8.8.8/8.8.8) with ESMTP id AAA03945; Tue, 6 Jun 2000 00:47:01 GMT (envelope-from doconnor@gsoft.com.au) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Tue, 06 Jun 2000 10:17:01 +0930 (CST) From: "Daniel O'Connor" To: Steve Quirk Subject: Re: Optimization Cc: hackers@FreeBSD.ORG, "Daniel C. Sobral" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 06-Jun-00 Steve Quirk wrote: > "A" is a simple memory fetch and both instructions can operate > independantly (the ".x", ".y" are just arbitrary struct offsets, right?). > > "B" is a fetch and a couple of trips through the ALU. > > It's splitting hairs, but I would opt for A since the memory cache should > help with the slower memory access. Well.. its not 'the ALU' anymore.. A modern CPU has many execution units. The processor can parallelize > x = d & MASK; > y = d >> SHIFT; because you don't write to d. Suck it and see :) --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message