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.8 required=5.0 tests=BAYES_00,TRACKER_ID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,13ab88b30e0f779d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-27 02:05:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!news.bme.hu!news.matavnet.hu!newsfeed.matavnet.hu!news1.dtag.de!news.erfurt.igrz.de!drcomp.erfurt.thur.de!not-for-mail From: Adrian Knoth Newsgroups: comp.lang.ada Subject: Re: Efficient Matrix? Date: 27 Dec 2002 09:53:54 GMT Organization: Modern Electronics Message-ID: References: <3e0b2a66_4@news.bluewin.ch> NNTP-Posting-Host: drcomp.erfurt.thur.de X-Server-Date: 27 Dec 2002 09:53:54 GMT User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:32328 Date: 2002-12-27T09:53:54+00:00 List-Id: Alvery Grazebrook wrote: >>> type MATRIX is array (POSITIVE range <>, POSITIVE range <>) of BOOLEAN; >>> type POINTER_MATRIX is access all MATRIX; >>> A : POINTER_MATRIX := new MATRIX(1..10000,1..5000); >> >>> ideas to optimize this. >> pragma Pack (MATRIX); > As you are probably aware, your matrix will take up 5e7 bits, or just > under 10 Mbytes of storage, assuming the compiler is efficient in the > way it packs the data. I'm not sure whether the compiler packs it at all. It is heap-allocated memory (not stack) and it is not a bounded array (the type MATRIX). That is why I cancelled my posting you're referring to. -- mail: adi@thur.de http://adi.thur.de PGP: v2-key via keyserver Esistsehrschwierigindiesensiebzigzeichenhierkreativzuseinoderetwanicht