Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Jun 2000 10:17:01 +0930 (CST)
From:      "Daniel O'Connor" <doconnor@gsoft.com.au>
To:        Steve Quirk <squirk@home.com>
Cc:        hackers@FreeBSD.ORG, "Daniel C. Sobral" <dcs@newsguy.com>
Subject:   Re: Optimization
Message-ID:  <XFMail.000606101701.doconnor@gsoft.com.au>
In-Reply-To: <Pine.BSF.4.21.0006052012420.31225-100000@cc677580-a.sumt1.nj.home.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.000606101701.doconnor>