From: axp@amazing.ch (Christoph Dworzak)
To: axp-list@redhat.com
Subject: Re: patch_v2: (on Alpha) emulating missing instructions
Date: Sun, 24 Oct 1999 15:04:00 GMT [thread overview]
Message-ID: <2906e107.u10t12e.d9cd7-axp@amazing.ch> (raw)
In-Reply-To: <19991023133917.A15599@twiddle.net> (from Richard Henderson <rth@twiddle.net>) (at Sat, 23 Oct 1999 13:39:17 -0700)
Hi
On Oct 23 Richard Henderson (rth@twiddle.net) wrote:
> On Mon, Oct 18, 1999 at 04:31:25PM +0100, Phil Carmody wrote:
> > D = (A & M) | (B & ~M);
I used the same sequence twice to exchange bits between two
variables depending on a mask:
t = (A & M) | (B & ~M);
B = (B & M) | (A & ~M);
A = t;
> > can be turned into
> > D = A ^ ((A ^ B) & M);
>
> I'll note that the former expression, given an andnot operation,
> has 3 ops and a tree height of 2. The later expression has 3 ops
> and a tree height of 3. I.e. the former expression takes better
> advantage of instruction-level parallelism.
In my App the later is faster (4 ops instead of 6):
t = (A ^ B) & M;
A ^= t;
B ^= t;
Can it get any better?
Bye
dworz
next prev parent reply other threads:[~1999-10-24 13:04 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-01-12 3:55 rpcc Christoph Dworzak
1999-01-12 3:20 ` rpcc Peter Petrakis
1999-01-12 4:59 ` rpcc Richard Henderson
[not found] ` <rth@twiddle.net>
1999-01-12 16:59 ` rpcc Christoph Dworzak
1999-01-12 19:27 ` rpcc Richard Henderson
1999-01-12 21:06 ` rpcc Wes Bauske
1999-01-13 2:16 ` rpcc Richard Henderson
1999-01-14 16:17 ` Alpha 21264 Christoph Dworzak
1999-01-14 15:46 ` Greg Lindahl
1999-01-14 17:27 ` Richard Henderson
1999-10-24 15:04 ` Christoph Dworzak [this message]
1999-10-25 9:47 ` patch_v2: (on Alpha) emulating missing instructions Phil Carmody
-- strict thread matches above, loose matches on Subject: below --
1999-01-13 14:10 Alpha 21264 Andy Almond
1999-01-13 16:36 ` Jeff Sturm
1999-01-14 6:50 ` Richard Henderson
1999-10-15 9:30 PATCH: (on Alpha) emulating missing instructions Luke Deller
1999-10-16 9:13 ` patch_v2: " Luke Deller
1999-10-18 13:05 Robert Harley
1999-10-18 14:46 Robert Harley
1999-10-18 15:31 ` Phil Carmody
1999-10-23 20:39 ` Richard Henderson
1999-10-21 16:23 ` patch_v3: emulating missing instructions on Alpha Luke Deller
1999-10-23 20:55 ` Richard Henderson
1999-10-24 0:28 ` Daniel Potts
1999-10-25 1:22 ` Luke Deller
1999-10-28 23:34 ` Richard Henderson
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox