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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.36.89.146 with SMTP id p140mr4862481itb.35.1516578576217; Sun, 21 Jan 2018 15:49:36 -0800 (PST) X-Received: by 10.157.24.117 with SMTP id t50mr246076ott.9.1516578576137; Sun, 21 Jan 2018 15:49:36 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!peer01.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!w142no1694752ita.0!news-out.google.com!b73ni5863ita.0!nntp.google.com!g80no1700125itg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 21 Jan 2018 15:49:35 -0800 (PST) In-Reply-To: <18b3920b-3562-4473-9cb0-0fdf15c64e2c@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.113.16.86; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 76.113.16.86 References: <8737309awj.fsf@jacob-sparre.dk> <18b3920b-3562-4473-9cb0-0fdf15c64e2c@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <7bb39ec5-1e23-4cca-b198-7286818b556a@googlegroups.com> Subject: Re: How to optimize use of RAM/disk access ? From: Shark8 Injection-Date: Sun, 21 Jan 2018 23:49:36 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Body-CRC: 309508007 X-Received-Bytes: 2274 Xref: reader02.eternal-september.org comp.lang.ada:50048 Date: 2018-01-21T15:49:35-08:00 List-Id: On Sunday, January 21, 2018 at 12:26:17 AM UTC-7, reinert wrote: > The reason I asked is that I develop the program on a desktop computer wh= ere it runs fast. When I run it on a laptop, it goes slow and "free-ing" po= inters seems to make it run easier (on the laptop which seems to have slowe= r disk (?)). The variance of HW isn't something you should be optimizing for on a standa= rd "user-level" program; that's the job of the OS which provides the "gener= al interface" for the program you're writing. (There are exceptions, such a= s lower-level utilities.) The best advice I can give, at such a high level (and with as little inform= ation as you provided), is to take a look at your algorithms and data-struc= tures and ensure those are appropriate -- in this vein, you can use pools/s= ubpools to free "everything" at that pool's level at once via clever use of= scoping.