From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,81b62fa6e95ab58b X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: aliased & packed? Date: 1997/05/13 Message-ID: #1/1 X-Deja-AN: 241324747 References: <5l5llv$4e@lotho.delphi.com> <1997May13.065907.1@eisner> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-05-13T00:00:00+00:00 List-Id: In article <1997May13.065907.1@eisner>, Larry Kilgallen wrote: >But that is for somebody who wants _only_ a single byte. In a great >many programs one wants several bytes in succession, and once a longword >or quadword has been loaded it can be shifted and masked several times to >produce the desired bytes. Since one memory access can produce up to >8 bytes, there is a clear performance benefit on a newer machine for >many programs to _avoid_ byte memory accesses. Is this really true? I mean, if you access one byte at the start of a word (using byte instructions on the 21164), then won't the next seven be sitting there in the cache waiting for you? And it seems like more than a couple of instructions to shift and mask an 8-byte word (I mean, using 21064 instructions only), in the case where the byte you want is dynamic (i.e. you're indexing randomly into an array of bytes -- on the other hand, most array accesses are probably sequential). >Which I believe supports my claim that this a compatibility rather than >a pure performance move. Quite likely true. ObAda: I doubt it was compatibility with Ada's rules about tasking and independent addressability that drove the decision. ;-) - Bob