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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7767a311e01e1cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!attbi_s72.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GNAT compiler switches and optimization References: <1161341264.471057.252750@h48g2000cwc.googlegroups.com> <9Qb_g.111857$aJ.65708@attbi_s21> <434o04-7g7.ln1@newserver.thecreems.com> <4539ce34$1_2@news.bluewin.ch> <453A532F.2070709@obry.net> <9kfq04-sgm.ln1@newserver.thecreems.com> <5vgs04-64f.ln1@newserver.thecreems.com> <453bc74e$0$19614$426a74cc@news.free.fr> <453bcdb9_6@news.bluewin.ch> <453bd9b5$0$31631$426a74cc@news.free.fr> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s72 1161570553 12.201.97.213 (Mon, 23 Oct 2006 02:29:13 GMT) NNTP-Posting-Date: Mon, 23 Oct 2006 02:29:13 GMT Date: Mon, 23 Oct 2006 02:29:13 GMT Xref: g2news2.google.com comp.lang.ada:7150 Date: 2006-10-23T02:29:13+00:00 List-Id: Jeffrey Creem wrote: > > Specifically, one of the biggest speedups posted (and suggested by one > person on the bugzilla list) changes the Ada program so it is no longer > a pointer to an unconstrained array but rather a pointer to a > constrained array where the constrained array type definition is > determined at run time based on the size of the command line parameter. > > This may seem like the same thing but where I am asserting this falls > apart is if someone wanted to write code that operated on variable sized > arrays, this approach would probably not work (i.e. dynamic creation of > a fixed length array). You should be able to get the best of both worlds: N : constant Positive := Integer'Value (Argument (1) ); type Base_Matrix is array (Positive range <>, Positive range <>) of Float; subtype Real_Matrix is Base_Matrix (1 .. N, 1 .. N); -- Jeff Carter "I unclog my nose towards you." Monty Python & the Holy Grail 11