From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,518f50a806126e60 X-Google-Attributes: gid1164f8,public From: karki@spot.Colorado.EDU (KARKI JITENDRA BAHADUR) Subject: Re: [?] A few alpha FAQs Date: 1997/01/01 Message-ID: #1/1 X-Deja-AN: 207083239 references: <5a90tn$74e@usenet.pa.dec.com> <32C99C31.4A45@zko.dec.com> organization: University of Colorado at Boulder nntp-posting-user: karki newsgroups: comp.sys.dec Tom Morris writes: >Stephen Hoff Hoffman wrote: >> Bluntly, hand-tuning the code is likely a waste of time -- the Alpha >> compilers are quite good at this, at code scheduling, and at dealing >> with tuning the code for future generations of processors. (Current >> generation Alpha microprocessors have two integer and two floating >> point units. That will change.) I would code in, say, C, and then >> profile the code for the hottest routines, and _then_ see if you can >> hand-tune better than the compilers' code generators. >It's generally true that people who think hand coded assembler is the >panacea for the world's performance problems are wrong, but in selected >cases it can be a big help. >The strategy of profiling to find hot spots as outlined above is a good >starting point. If the profile is fairly 'flat', then assembly language >isn't likely to help. On the other hand, if you've got an inner loop >that's just a few lines long taking up 40% of your time AND the compiler >is not generating optimal code, then it might be worth looking at hand >coding things. >Having said that, hand coding things tends to make maintenance more >difficult (fewer people understand it) and the time spent doing it >could often get bigger performance gains by dealing with system level >tuning or algorithmic changes. Most importantly, it's not really very >much fun! The above comments seem to indicate that my original query might have been taken a little out of context. I was just trying to get enough info to enable me to construct a semi-accurate software model for the 21164. The file referred to by Neidecker-Lutz (as corrected in your companion post) proved to be exactly the thing I needed. It seems that with ordinary assembly code, the part should be about as fast for my pet program, clock for clock, as a PentiumPro, and only slighty faster with extraordinary code. The biggest stumbling blocks for this project were the limited scope the of FM pipe and the way the processor steps on its toes when it writes to memory (or L1 cache). It remains to be seen whether DEC's F90 compiler will generate code of this quality; LF90 had a hard time with this program, generating code that was 5X slower than the assembly version, and Watcom C/C++ was 3X slower. Maybe I'll be pleasantly surprised, though. That's not to say that I wouldn't try to improve even quite good compiler generated code with assembly language, though. I'm a hobbyist and not a professional programmer and I just happen to prefer that kind of thing to building ships in bottles. Thanks for all the help, guys!