From: "Chris Eleveld" <Chris_Eleveld@sector7.com>
To: <axp-list@redhat.com>
Subject: RE: Alpha Optimization
Date: Tue, 10 Sep 2002 21:16:57 -0500 [thread overview]
Message-ID: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAARfEe0Y0eQUKjlPmEPZTXU8KAAAAQAAAAIq1TLKvYOk67BdW/dlHvkwEAAAAA@sector7.com> (raw)
In-Reply-To: <v53cshs8l6.fsf@Playmate.dfc>
To avoid unaligned accesses flatten the array out to 64 bit longs.
Either using bit shifting or as a larger array. I believe single byte
accesses are the worst on alpha but I could be wrong. Also there should
be some architecture switches to take advantage oft EV68 instructions
for dealing with bytes. I think. I'm certain someone here will correct
me if I'm way off base.
-----Original Message-----
From: axp-list-admin@redhat.com [mailto:axp-list-admin@redhat.com] On
Behalf Of Rui-Tao Dong
Sent: Tuesday, September 10, 2002 6:56 PM
To: axp-list@redhat.com
Subject: Alpha Optimization
I haven't seen much traffic on the list for while. Here is a question
for you guys.
I am trying to divide two 8 bit images (A*256/B) as fast as possible.
I built a lookup table of all possible combinations of A & B (64KB)
and do the lookup on the images. On a 2.0GHz P4, it takes about
28msec on a 1280x1024x24 images. On the 1.0GHz ev68 (at Compaq
testdrive), it takes about 57msec, which is very disappointing. I was
expecting the Alpha to be much faster due to its larger L1 cache and
faster memory IO. The relevant code is below. I tried both gcc -O6
and ccc -O3.
pTab is the pre-constructed 256x256 lookup table, with numerator as
the row index and denominator as the column index.
typedef unsigned char pixel8;
for (l=0; l<100; ++l)
{
pixel8* pOut = output_buf;
const pixel8* pN = input_buf;
const pixel8* pD = white_buf;
int r;
for (r=0; r< HEIGHT; ++r)
{
int c;
for (c=0; c< WIDTH*3; ++c)
{
int i = ((*pN)<<8) + (*pD);
*pOut = pTab[i];
++pN;
++pD;
++pOut;
}
}
}
Any idea?
Regards,
--
Dr. Rui-Tao Dong Aria Systems, Inc.
(949)291-XXXX(Cell) P. O. Box 52123
rdong@cox.net Irvine, CA 92619
_______________________________________________
Axp-list mailing list
Axp-list@redhat.com
https://listman.redhat.com/mailman/listinfo/axp-list
next prev parent reply other threads:[~2002-09-11 2:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-10 23:55 Alpha Optimization Rui-Tao Dong
2002-09-11 2:16 ` Chris Eleveld [this message]
2002-09-11 5:33 ` Thorsten Koch
2002-09-11 19:05 ` Nikita Schmidt
-- strict thread matches above, loose matches on Subject: below --
2002-09-11 14:41 Donsbach, Jeff
2002-09-11 14:53 Block, Kenneth
2002-09-11 15:54 ` Rui-Tao Dong
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