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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Examining individual bytes of an integer Date: Fri, 19 Oct 2018 09:27:17 +0300 Organization: Tidorum Ltd Message-ID: References: <9d90fa3e-f800-4086-bf97-a65474a8140a@googlegroups.com> <4ddbc9bf-0e2e-466d-8238-d8f709b985e1@googlegroups.com> <35f53cd9-4979-49b8-a5df-2c1cf0764507@googlegroups.com> <39be8a25-cc06-4db4-9481-7f484077522d@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net HKklLK7oWHjvzQiTQ6ndPAgPyRF+NEcsTgEHlIw0pCkaaIgnes Cancel-Lock: sha1:o5e7ALrOfLHGui6jZmF5apBPg+Y= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Xref: reader02.eternal-september.org comp.lang.ada:54642 Date: 2018-10-19T09:27:17+03:00 List-Id: On 18-10-19 00:18 , Randy Brukardt wrote: > "AdaMagica" wrote in message > news:39be8a25-cc06-4db4-9481-7f484077522d@googlegroups.com... > ... >> There remains the other statement: >> "By reasonable induction :-) the second, third, etc. array elements >> follow in increasing address order. But not _guaranteed_, I agree." >> >> I still claim that this has too be true (of course with a grain of salt for >> packead arrays). > > I agree, it would make indexing calculations really expensive if it isn't > true. And I don't see a compiler author doing that on purpose. Oh, I'm not so sure... Storing by *reverse* index order should not be much more expensive, if at all. I seem to remember hearing about a Pascal compiler in which record components were stored in reverse lexical declaration order, just because of the way the compiler turned out, or so I understood. And the people working on probabilistic WCET analysis want to randomize lots of things, such as cache address mappings, and are creating HW processors with such features. Perhaps they would like to randomize also array component order... -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .