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: Tom Morris Subject: Re: [?] A few alpha FAQs Date: 1996/12/31 Message-ID: <32C99C31.4A45@zko.dec.com>#1/1 X-Deja-AN: 207011863 references: <5a90tn$74e@usenet.pa.dec.com> content-type: text/plain; charset=us-ascii organization: Digital Equipment Corporation mime-version: 1.0 reply-to: morris@zko.dec.com newsgroups: comp.sys.dec x-mailer: Mozilla 3.0 (WinNT; I) 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! --------------------------------------------------------------------------- Tom Morris Digital Equipment Corporation morris@zko.dec.com 110 Spit Brook Road ZKO1-1/E37 +1 603 881 0894 Nashua, NH, 03062 USA