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.42.141 with SMTP id s13mr10849136qae.3.1371518473229; Mon, 17 Jun 2013 18:21:13 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.49.62.3 with SMTP id u3mr421318qer.26.1371518473213; Mon, 17 Jun 2013 18:21:13 -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!news.bbs-scene.org!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!bw2no2043887qab.0!news-out.google.com!y6ni3349qax.0!nntp.google.com!j2no560114qak.0!postnews.google.com!v17g2000vba.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 17 Jun 2013 18:21:13 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: v17g2000vba.googlegroups.com; posting-host=105.236.184.29; posting-account=p-xPhAkAAADjHQWEO7sFME2XBdF1P_2H NNTP-Posting-Host: 105.236.184.29 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 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5 Safari/536.30.1,gzip(gfe) Message-ID: <35b14a90-0f39-4b90-87b4-be0432af71ca@v17g2000vba.googlegroups.com> Subject: Re: Bug in 'gnatmake' (Was: Range check for type 'Integer') From: Peter Brooks Injection-Date: Tue, 18 Jun 2013 01:21:13 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:15799 Date: 2013-06-17T18:21:13-07:00 List-Id: On Jun 17, 11:22=A0pm, Jeffrey Carter wrote: > On 06/17/2013 12:15 PM, Peter Brooks wrote: > =A0> > =A0> Leaving on range, and other, checking must slow things down a tad, b= ut > =A0> turning the optimiser on must speed them up. It'll only really matte= r > =A0> in CPU intensive stuff, but do you have any idea what the effects ar= e? > =A0> More or less. > > IMO, leaving on checks speeds things up a bit, if you're interested in co= rrect > code; code without buffer-overflow and integer-overflow vulnerabilities a= nd the > like. An Ada compiler can optimize away many index checks, for example, w= hich > doesn't happen to checks manually inserted in a language without automati= c > checks. So it should be the case that correct code in Ada is faster than > equivalent code in a language without automatic checks. > > Of course, if correctness isn't an issue, then things might work otherwis= e. But > if correctness isn't an issue, the null program should be an acceptable s= olution > to any problem, and that should be just as fast in Ada as in any other la= nguage. > > =A0> I know I could just take my code and try it, but it'd be interesting > =A0> to have a bigger picture of the performance question. > > There's always the Ada (83) beats assembler paper: > > http://www.seas.gwu.edu/~adagroup/sigada-website/lawlis.html > Thank you for that - I'd not read it. It makes the point very well!