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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,aa14979d20ba3045 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!z7g2000vbh.googlegroups.com!not-for-mail From: sjw Newsgroups: comp.lang.ada Subject: Re: GNAT, aggregates and efficiency (Was: Use aggregates) Date: Tue, 12 May 2009 11:57:17 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <4a07fc7a$0$2855$ba620e4c@news.skynet.be> <87prefhq04.fsf@nbi.dk> <62aa80a1-1c0b-4716-ab16-9b6243d97ff2@o27g2000vbd.googlegroups.com> <8a88003e-b3d4-4e6f-8bff-bb993c6e540f@s20g2000vbp.googlegroups.com> NNTP-Posting-Host: 82.20.239.89 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1242154637 3041 127.0.0.1 (12 May 2009 18:57:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 12 May 2009 18:57:17 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z7g2000vbh.googlegroups.com; posting-host=82.20.239.89; posting-account=_RXWmAoAAADQS3ojtLFDmTNJCT0N2R4U User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5797 Date: 2009-05-12T11:57:17-07:00 List-Id: On May 12, 6:58=A0am, Jacob Sparre Andersen wrote: > wrote: > > Someone recently found it was quicker to test an array for some > > condition by looping through it rather than by comparing with an > > aggregate [eg X =3D (others =3D> 0)]. I had naively assumed that GNAT > > would just do the comparisons of the elements of X against 0, as the > > hand-crafted loop does, rather than construct a whole array of zeros > > on the stack and then loop through that ... > > With which command line arguments and aggregate sizes is this the > case? It was in this thread, I think: http://groups.google.com/group/comp.lang.ada/browse_frm/thread/3737542e2ed2= b8e1/faecd7f658a4da62?lnk=3Dgst&q=3Dadarubik#faecd7f658a4da62