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,a88e582de42cdc9b X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.albasani.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Bug in Ada (SuSe 10.2) ? Date: Thu, 21 Feb 2008 17:01:15 -0600 Organization: Jacob's private Usenet server Message-ID: References: <48277611-402f-4622-be05-6edddf6dd56a@o10g2000hsf.googlegroups.com> <624tidF21i3nvU2@mid.individual.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1203635448 28476 69.95.181.76 (21 Feb 2008 23:10:48 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 21 Feb 2008 23:10:48 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1914 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914 Xref: g2news1.google.com comp.lang.ada:19961 Date: 2008-02-21T17:01:15-06:00 List-Id: "Alex R. Mosteo" wrote in message news:624tidF21i3nvU2@mid.individual.net... > tmoran@acm.org wrote: ... > > More importantly, how many times have we seen postings here from people > > new to Ada saying "I heard about Ada, this supposedly highly safe > > language, but it doesn't even catch an overflow, though the manual claims > > it does."? vs How many times have people new to Ada posted messages > > asking about some obscure compiler bug they've stumbled across. > > vs How many times "my number-crunching program is horribly slow, in > fortran it was lightning fast"? > > I /believe/ this has happened maybe once or twice in the last lustrum, > for sure not enough to justify not having -gnato by default. I don't think (at least on the Intel hardware) that -gnato has much to do with the speed of floating point operations. They're much more dependent on the cost of range checks, the rules that prevent rearrangements if exceptions can be raised, and the Ada accuracy rules. All of which can be worked around, but that requires more effort than simply changing some flag on the command line. Moreover, the code that is speed-critical is always a small part of any program. It is bad practice to turn off checks everywhere simply so that a small piece of code will run faster. It's simply premature optimization. Now, I realize that some people run benchmarks without any tuning, and use that to claim that some implementation of some language is "slow". (Or worse, make the claim that the entire language is "slow", forgetting that implementations can vary widely.) We could combat that by turning off all checks by default and by letting optimizers rearrange code in any way that they like and so on. But the result would have none of the values of Ada. Is that really the only way to sell Ada? The important thing is that tuned Ada code can be as fast as tuned C code (or tuned Fortran code), not whatever happens by default. People usually are comparing raw Ada code to tuned C and Fortran code anyway -- what do you *think* is going to happen? If the only way to sell Ada is to make it more like C, then we've already lost. Customers sold Ada that way won't gain any of the benefits of using Ada, and are likely to end up thinking they were sold something that is more hype that results. That's not going to help Ada in the long run (or even the medium run), although it might help someone's bottom line for a while. Thus, I conclude if omitting language-defined checks is that important to selling an Ada compiler, there is no hope for Ada. We all should find something more useful to do. Randy.