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.224.86.200 with SMTP id t8mr10118263qal.0.1371503397878; Mon, 17 Jun 2013 14:09:57 -0700 (PDT) X-Received: by 10.50.141.225 with SMTP id rr1mr504338igb.17.1371503397841; Mon, 17 Jun 2013 14:09:57 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!bw2no2021473qab.0!news-out.google.com!y6ni3349qax.0!nntp.google.com!j2no535225qak.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 17 Jun 2013 14:09:57 -0700 (PDT) In-Reply-To: <049bb1b4-4a9f-4238-8d60-c990f1a1d392@u9g2000vbc.googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=69.20.190.126; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 69.20.190.126 References: <7f33982d-3bcf-452e-a3b3-3a0a28505ff1@x20g2000vbe.googlegroups.com> <87r4g0g9c0.fsf@adaheads.sparre-andersen.dk> <049bb1b4-4a9f-4238-8d60-c990f1a1d392@u9g2000vbc.googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <12d67b9f-02ca-4f24-aeaa-db9b0e4e92cc@googlegroups.com> Subject: Re: Bug in 'gnatmake' (Was: Range check for type 'Integer') From: Shark8 Injection-Date: Mon, 17 Jun 2013 21:09:57 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 3039 Xref: news.eternal-september.org comp.lang.ada:15789 Date: 2013-06-17T14:09:57-07:00 List-Id: On Monday, June 17, 2013 1:15:26 PM UTC-6, Peter Brooks wrote: > On Jun 17, 6:50=A0pm, Robert A Duff >=20 > wrote: > > > > You usually want -g (debugging info). =A0And the debugger works > > better if you turn off optimizations (-O0). > > >=20 > Since you mention it, I'm interested to know if there are many Ada > benchmarks. >=20 > Leaving on range, and other, checking must slow things down a tad, but > turning the optimiser on must speed them up. It'll only really matter > in CPU intensive stuff, but do you have any idea what the effects are? I'm not sure about that -- one user here did some testing (C++ vs Ada [w/ c= hecks and w/o; IIRC, all optimized]) and found that the difference in C++ a= nd checked Ada was basically measurement-error. [Again, IIRC.] Also to note is that Ada compilers are generally good about removing unneed= ed checks FOR INDEX IN THE_ARRAY'RANGE LOOP, for example doesn't need any c= hecks precisely *because* the checks are implicit in setting the ranges of = the for-loop -- and that is the oversimple case. >=20 > I know I could just take my code and try it, but it'd be interesting > to have a bigger picture of the performance question. IMO this is somewhat akin to some people trying to optimize the number of t= asks based on their CPU core-count -- that's the stupid way to go, use TASK= s to split your program logically and let the run-time handle managing thin= gs. If there's more tasks than Cores, great the cores will all be active --= if not then another core can do more meaningful work from somewhere else, = great! (IE no need to optimize so prematurely.)