From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,8f5d1a752f156315 X-Google-Attributes: gid1164f8,public X-Google-Thread: f7344,8f5d1a752f156315 X-Google-Attributes: gidf7344,public X-Google-ArrivalTime: 2001-09-10 15:31:33 PST Message-ID: <3B9D3F90.4B220CB1@applied-synergy.com> Date: Mon, 10 Sep 2001 17:32:48 -0500 From: Chris Scheers Organization: Applied Synergy, Inc. X-Mailer: Mozilla 4.78 [en] (WinNT; U) X-Accept-Language: en,pdf MIME-Version: 1.0 Newsgroups: comp.os.vms,comp.sys.dec Subject: Unaligned memory access (Was: Re: EV7 will never ship?) References: <9mgp89$4ja$1@pegasus.csx.cam.ac.uk> <+EaE$Ih1IXSX@eisner.encompasserve.org> <86itf795wt.fsf@mihalis.net> <3B8C4408.5D9433B0@videotron.ca> <3B8CD0E2.153D8125@virgin.net> <3B96C025.2267D829@fsi.net> <9nan0h$8t5$1@pyrite.mv.net> <3B99BEB2.9C0CF0C9@mcmail.maricopa.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: dialup-209.245.238.24.dial1.dallas1.level3.net X-Trace: sys13.hou.wt.net 1000157861 dialup-209.245.238.24.dial1.dallas1.level3.net (10 Sep 2001 17:37:41 -0400) Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!jfk3-feed1.news.digex.net!dca6-feed2.news.digex.net!intermedia!newsfeed1.cidera.com!Cidera!news-reader.ntrnet.net!uunet!ash.uu.net!dfw.uu.net!sys13.hou.wt.net Xref: archiver1.google.com comp.os.vms:43783 comp.sys.dec:7182 Larry Kilgallen wrote: > > In article <3B9A4043.B0EA696B@mcmail.maricopa.edu>, Carl Nelson writes: > > > > > > Bill Gunshannon wrote: > > > >> > >> A question for any of our resident Alpha engineering experts. I have seen > >> mentioned a number of times the concept that the Alpha can run either > >> big-endian or little-endian. Is there any performance impact on either > >> one or would it perform equally well in either mode?? > >> > >> Not really important, but I am curious. > >> > >> bill > >> > > > > I'm not an Alpha engineering expert, but I play one on TV... > > > > I seem to remember, from snips of code in the architecture handbook and the > > compiler writer's guide, that there is a one or two instruction penalty for > > big-endian access under certain circumstances. IIRC these were mainly in the > > case of certain unaligned memory access sequences. With aligned access there > > were no differences, and with most, if not all, of the non-memory access > > sequences there were no differences at all. > > And that one or two instruction penalty is dwarfed by the penalty for > using unaligned access in the first place. > > Later VAXes also have a penalty for unaligned access, but it is hidden > in the hardware. AFAIK, there is a penalty for unaligned access in ALL VAXen. The later VAXen seem to do a better job of hiding the penalty. Specifically, while rewriting some CPU bound code to use aligned data (and to take better advantage of registers), I found the following improvements in throughput: MicroVAX II 4x VAXstation 4000-90 2x AlphaStation 255/233 4x Testing with other similar generation processors gave similar numbers. (I have not had a chance to check this code on an EV5 or EV6. Actually, on Alphas, the code is fast enough that optimization is not really an issue. ) I attribute the difference between the MV II and VS4000 numbers to caching. The MV II does not have a memory cache and thus more directly shows the difference in memory accesses (an unaligned read may require two memory accesses, an unaligned write may require four). The caching in the later processors tends to minimize the impact of an unaligned access. ----------------------------------------------------------------------- Chris Scheers, Applied Synergy, Inc. Voice: 817-237-3360 Internet: chris@applied-synergy.com Fax: 817-237-3074