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!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Why couldn't an operating system be written in ada Date: Thu, 28 Feb 2019 08:28:03 +0000 Organization: A noiseless patient Spider Message-ID: References: <4s8rud$9j3@tribune>#1/1> <67b7e60f-2750-4982-ab03-4f04178dd739@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="b762c5e6fe84d6eb0ab322d3b03d0457"; logging-data="31338"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xuYrbwQWhMtgMyZn+EI9ogizsZAyDUm0=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin) Cancel-Lock: sha1:SoOjugqjnumR8+0bkgOqfbiy6mI= sha1:EVXWFzNTUNM2dnzrA0vtPkA9C3Q= Xref: reader01.eternal-september.org comp.lang.ada:55716 Date: 2019-02-28T08:28:03+00:00 List-Id: G. B. writes: > Patrick Jakubowski wrote: >> I am curious myself if I could prepare and provoke ADA to keep data >> structures in L1 cache. >> > > You can. (I wouldn‘t know, though, how to have the ADA (organization) > store things in a cache.) The idea is that Ada (the language) lets the > programmer express, with relative ease, what needs to be known to > safely disable checks. And then, also, the run-time system can be > minimized, even zeroed. I found a paper on cache-conscious data structures[1], which was much more interested in locality than in detailed representation. If you have a large data structure, better to have the 'hot' parts of an individual node in a smaller object, so they stand more chance of getting into the same cache line, with the 'cold' parts kept elsewhere. Looked like a lot of work, it'd have to be worth it. [1] https://www.microsoft.com/en-us/research/wp-content/uploads/2016/12/ccds.pdf