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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Bug in 'gnatmake' (Was: Range check for type 'Integer') Date: Mon, 17 Jun 2013 14:22:54 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <7f33982d-3bcf-452e-a3b3-3a0a28505ff1@x20g2000vbe.googlegroups.com> <87r4g0g9c0.fsf@adaheads.sparre-andersen.dk> <049bb1b4-4a9f-4238-8d60-c990f1a1d392@u9g2000vbc.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 17 Jun 2013 21:17:57 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="ea9e222491b6e4ac16c72e6c1b727e42"; logging-data="28680"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180fB1fx4hhzZcZkSXEvt6d8qagMZFRJgU=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <049bb1b4-4a9f-4238-8d60-c990f1a1d392@u9g2000vbc.googlegroups.com> Cancel-Lock: sha1:V+R6RuKx5sWDcDsXoM8USLLFPvk= Xref: news.eternal-september.org comp.lang.ada:15791 Date: 2013-06-17T14:22:54-07:00 List-Id: On 06/17/2013 12:15 PM, Peter Brooks wrote: > > 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? > More or less. IMO, leaving on checks speeds things up a bit, if you're interested in correct code; code without buffer-overflow and integer-overflow vulnerabilities and the like. An Ada compiler can optimize away many index checks, for example, which doesn't happen to checks manually inserted in a language without automatic 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 otherwise. But if correctness isn't an issue, the null program should be an acceptable solution to any problem, and that should be just as fast in Ada as in any other language. > 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. There's always the Ada (83) beats assembler paper: http://www.seas.gwu.edu/~adagroup/sigada-website/lawlis.html -- Jeff Carter "Pray that there's intelligent life somewhere up in space, 'cause there's bugger all down here on earth." Monty Python's Meaning of Life 61