Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: karki@spot.Colorado.EDU (KARKI JITENDRA BAHADUR)
Subject: Re: [?] A few alpha FAQs
Date: 1997/01/01	[thread overview]
Message-ID: <karki.852107959@spot.Colorado.EDU> (raw)
In-Reply-To: 32C99C31.4A45@zko.dec.com


Tom Morris <morris@zko.dec.com> 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!



  reply	other threads:[~1997-01-01  5:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-27  5:00 [?] A few alpha FAQs KARKI JITENDRA BAHADUR
1996-12-30  5:00 ` Stephen Hoff Hoffman
1996-12-31  5:00   ` Tom Morris
1997-01-01  5:00     ` KARKI JITENDRA BAHADUR [this message]
1997-01-02  5:00     ` H.W. Stockman
1997-01-03  5:00       ` Stephen Hoff Hoffman
1996-12-30  5:00 ` Burkhard Neidecker-Lutz
1996-12-31  5:00   ` Tom Morris
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