comp.lang.ada
 help / color / mirror / Atom feed
From: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Subject: Re: Efficient Matrix?
Date: 26 Dec 2002 22:09:30 GMT
Date: 2002-12-26T22:09:30+00:00	[thread overview]
Message-ID: <slrnb0mvgq.j0i.adi@drcomp.erfurt.thur.de> (raw)
In-Reply-To: 3e0b2a66_4@news.bluewin.ch

Jonas Gasser <jonas.gasser@dataflow.ch> 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.

You might want to pack it. And you might even want to think about
your style. Here is an example:

procedure bla is

   type MATRIX is array (Positive range <>, Positive range <>) of Boolean;
   type POINTER_MATRIX is access all MATRIX;

   pragma Pack (MATRIX);

   A : POINTER_MATRIX := new MATRIX (1 .. 10000, 1 .. 5000);

begin
   null;
end bla;

I would also write the identifiers in lower-/mixedcase, now it awfully
looks like MODULA.

-- 
mail: adi@thur.de  	http://adi.thur.de	PGP: v2-key via keyserver

Werbung f�r einen Sch�tzenverein:
"Lernen Sie bei uns schie�en und treffen Sie gute Freunde!"



       reply	other threads:[~2002-12-26 22:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3e0b2a66_4@news.bluewin.ch>
2002-12-26 22:09 ` Adrian Knoth [this message]
2002-12-27  0:23   ` Efficient Matrix? Alvery Grazebrook
2002-12-27  9:53     ` Adrian Knoth
2002-12-27 16:58       ` Robert A Duff
2002-12-28  1:44         ` Nick Roberts
2002-12-28 13:00         ` Adrian Knoth
2002-12-28 15:21           ` Bill Findlay
2002-12-28 15:48             ` Adrian Knoth
2002-12-28 23:26               ` Adrian Knoth
2002-12-28 16:07             ` Robert A Duff
2002-12-28 17:25               ` Bill Findlay
2002-12-28 17:35                 ` Bill Findlay
2002-12-28 20:51                 ` Robert A Duff
2002-12-28 15:58           ` Robert A Duff
2002-12-28 17:19             ` Adrian Knoth
2002-12-28 19:16               ` James S. Rogers
2002-12-28 20:45               ` Robert A Duff
2002-12-28 22:07                 ` Adrian Knoth
2002-12-28 23:42                   ` Robert A Duff
2002-12-27 12:25 ` Gautier
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox