Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!nigel.ee.udel.edu!mccalpin From: mccalpin@perelandra.cms.udel.edu (John D. McCalpin) Newsgroups: comp.arch Subject: Re: Alignment on RS/6000 Message-ID: Date: 20 Nov 90 14:24:51 GMT References: Sender: usenet@ee.udel.edu Organization: College of Marine Studies, U. Del. Lines: 45 Nntp-Posting-Host: perelandra.cms.udel.edu In-reply-to: aglew@crhc.uiuc.edu's message of 20 Nov 90 05:45:34 GMT >>>>> On 20 Nov 90 05:45:34 GMT, aglew@crhc.uiuc.edu (Andy Glew) said: [concerning the huge performance penalty on the RS/6000 for misaligned accesses] Andy> I'll bet the misalignment slowdown noted in the last post was due to Andy> trapping and handling the misalignment in the trap handler. Most likely. Andy> But it makes you think: is it really worth being backward compatible Andy> if there is such a huge performance penalty? Can you imagine the Andy> novice user who would not know how to look for such a problem? Can Andy> you imagine UNIX Review publishing a benchmark with that sort of Andy> problem? Anyone who writes code like the test case presented (which calls a double-precision arithmetic routine and passes it a character*1 variable array to work on!) deserves whatever miserable performance that they get. Andy> Put another way, maybe such backward compatibility should not be Andy> present by default. Maybe the program should die with the message Andy> Andy> Error: misaligned accesses. "fort -misaligned" may be used. Andy> so that the user would have to go and turn on the misaligned compatbility Andy> mode, and would be aware of the possible performance costs. The example given was not terribly representative of real codes. A *much* more likely cause of poor alignment is placing a double-precision entity after an odd number of integer items in a common block. In these cases the user is given an informative error message by the compiler (or loader?). I don't understand why IBM chose not to include an 'auto-double' flag in the RS/6000 FORTRAN compiler. If 'auto-double' upgraded INTEGERs to 64-bits as well as REALs, then the alignment problem would be solved on the overwhelming majority of real codes. P.S. How many people out there caught my quotes in UNIX TODAY (November 12, page 8), complete with a misspelled name. At least my comments were transmitted accurately! -- John D. McCalpin mccalpin@perelandra.cms.udel.edu Assistant Professor mccalpin@vax1.udel.edu College of Marine Studies, U. Del. J.MCCALPIN/OMNET