From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 110292,e56d115cef48b8c8 X-Google-Attributes: gid110292,public X-Google-Thread: 1164f8,e56d115cef48b8c8 X-Google-Attributes: gid1164f8,public From: "H.W. Stockman" Subject: Re: Reed-Solomon [was: Re: big memory on PPro or Alpha] Date: 1997/01/25 Message-ID: <32EAB740.627F@swcp.com>#1/1 X-Deja-AN: 212240109 references: <19970124010001.UAA26228@ladder01.news.aol.com> content-type: text/plain; charset=us-ascii organization: Southwest Cyberport mime-version: 1.0 reply-to: hwstock@swcp.com newsgroups: comp.sys.intel,comp.sys.dec x-mailer: Mozilla 3.0Gold (Win95; U) Subject: Reed-Solomon [was: Re: big memory on PPro or Alpha] References: <32D92EFD.7B60@spam.off> David Mosberger-Tang said: >johnl@Radix.Net (John A. Limpert) writes: > >> On Thu, 16 Jan 1997 19:37:54 -0800, Jeffrey Potoff >> wrote: >> >> >What hype would that be ? Facts are facts. Send whatever source >> >code you're running that's so much faster on a PPro and I'll >> >benchmark it on a 433mhz 21164 Alpha so we can end this nonsense once >> >and for all. >> >> I benchmarked an Alpha with a Reed-Solomon encoder that I wrote and my >> 90 MHz Pentium beat it. The Alpha seemed to have alot of trouble with >> all of the byte sized operations in the encoder software. The Alpha is >> a neat chip but it stumbled on my application. > >John was kind enough to send me his Reed Solomon code. Sure enough, I >got the following results on a 200MHz P6 Linux machine and two 300MHz >ev5 machines (21164 without subword load/store). One of the ev5 >machines was running Linux, the other OSF/1. Under Linux, I used gcc >-O2 for compilation, under OSF/1 I used cc -migrate -O4 -tune ev5: > >original code: > >686:200MHz:Linux:gcc -O2: 2.8MB/sec >ev5:300MHz:Linux:gcc -O2: 0.74MB/sec >ev5:300MHz:OSF/1:cc -migrate -O4 -tune ev5: 0.74MB/sec > >The code had some obvious inefficiencies, so I spent half an hour >getting rid of the worse offender. The results with that code are >below: > >improved code: > >686:200MHz:Linux:gcc -O2: 3.4MB/sec >ev5:300MHz:Linux:gcc -O2: 10.0MB/sec >ev5:300MHz:OSF/1:cc -migrate -O4 -tune ev5: 11.4MB/sec > >This is obviously much more reasonable. Note that the 686 improved as >well, but only by 21% as compared to a factor of 15.4 for the Alpha. >I suspect there are two reasons the Alpha did so poorly with the old >code: (a) some of the arrays are exactly 8KB big (size of primary >cache), so there might be some thrashing going on and (b) the byte ? I thought only the older alphas (e.g. 21066) had direct-mapped caches. Remember the PPro also has 8KB(D) in L1. We can add: 686:200MHz:DOS:Symantec 6.0 -o: 3.64MB/sec 686:200MHz:DOS:Watcom 9.5 /omaxnet /zp4 /5r: 2.85MB/sec However, I'm wondering how much this benchmark is biased by the small size of the arrays, which are read repeatedly to generate a sufficiently long test? Since I don't know what the bench does, it is difficult for me to change meaningfully the N and K params. I tried changing them to 2559 and 2537, which dropped the MB/sec on the PPro about 30% -- but I also got a segment fault after the arrays printed. My first impulse was to recode the p[0] = p[1] ^ q[0]... stuff into an assembly language function... but using the asm function actually slowed the symantec result down by 25%. I think the slowdown resulted from: the extra calling, pushing and popping overhead (which comprise 29% of the instructions); and the decrease in available optimization strategies for the calling function. I was also fairly sloppy with instruction pairing. (Though how would an MMX Pentium do? There would be eight extra 64-bit regs, and all the traditional regs would be available for addressing.) The poorer performance of Watcom (relative to Symantec) is intriguing. Watcom has done significantly better on every standard benchmark (nsieve, dhrystone, linpack, flops,...) I've run in the past; but this is the second time in a week I've had Watcom perform ca. 20 to 30% worse on a "real" code. ------------------------------------------------------- While this Reed-Solomon example has obvious and simple strategies to overcome the alpha's byte-access problems, I'd wager I can come up with an example that is much more refractory: the "lattice-gas automata" (LGA) translation and collision steps. I can't provide C code, since I've always written the inner loops in assembly language; but if there is sufficient interest, I can describe the problem in enough detail to get people debating the point (to see how LGA are used, visit: http://www.sandia.gov/eesector/gs/gc/movies.htm ). We considered moving the LGA code to an SGI R10000 system or alpha (from x86), to take advantage of the 64-bit registers, but I was scared off by the byte-addressing problem and the porting time. About that time, I decided to go to lattice boltzmann methods instead of LGA, and we will eventually get to compare those on alpha and PPro. Harlan Stockman a.k.a. "OOG the Caveman"