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!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.109.57.191.169.mobile.3.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: How to optimize use of RAM/disk access ? Date: Sat, 20 Jan 2018 09:45:00 +0100 Organization: JSA Research & Innovation Message-ID: <8737309awj.fsf@jacob-sparre.dk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: franka.jacob-sparre.dk; posting-host="109.57.191.169.mobile.3.dk:109.57.191.169"; logging-data="1269"; mail-complaints-to="news@jacob-sparre.dk" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:Rvyb6CR1OhcMUd9vl/DcDCnE0gk= Xref: reader02.eternal-september.org comp.lang.ada:50016 Date: 2018-01-20T09:45:00+01:00 List-Id: reinert writes: > I am developing an Ada program which I want automatically, more or > less, to optimize its use of RAM and disk access. Assume a number, N, > controls/defines the size of a data set (for example N represents > number of images which the program stores internally). Just now I am > guessing a number, N, which I experience make my computer run the > program the best way. However, when I change computer, I have to guess > again :-) > > Any hint for how I can optimize a bit smarter? Let your operating system worry about those things. Load what you need into the address space of your program, and leave it to the operating system and CPU to decide what is stored on which cache level between disk and CPU registers. Greetings, Jacob -- »Saving keystrokes is the job of the text editor, not the programming language.« -- Preben Randhol