comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Bug in Ada (SuSe 10.2) ?
Date: Thu, 21 Feb 2008 17:01:15 -0600
Date: 2008-02-21T17:01:15-06:00	[thread overview]
Message-ID: <fpl0dn$rps$1@jacob-sparre.dk> (raw)
In-Reply-To: 624tidF21i3nvU2@mid.individual.net

"Alex R. Mosteo" <amosteo@unizar.es> 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.






  reply	other threads:[~2008-02-21 23:01 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-19  8:47 Bug in Ada (SuSe 10.2) ? Reinert Korsnes
2008-02-19  9:08 ` Niklas Holsti
2008-02-19  9:53   ` Reinert Korsnes
2008-02-19 11:21     ` Ludovic Brenta
2008-02-20 12:41       ` Reinert Korsnes
2008-02-20 16:50         ` Adam Beneschan
2008-02-20 18:31           ` Jeffrey R. Carter
2008-02-20 23:10             ` Adam Beneschan
2008-02-20 23:22             ` Adam Beneschan
2008-02-21  0:31               ` Randy Brukardt
2008-02-21  8:56                 ` Jean-Pierre Rosen
2008-02-21  9:08                   ` Alex R. Mosteo
2008-02-21  9:27                     ` Ludovic Brenta
2008-02-21  9:46                       ` billjones6789
2008-02-21 12:27                         ` Access type (mis)use (Was: Bug in Ada (SuSe 10.2) ?) Jacob Sparre Andersen
2008-02-21 19:40                           ` Bob Klungle
2008-02-21 21:25                             ` Jeffrey R. Carter
2008-02-21 21:57                             ` Vadim Godunko
2008-02-21 22:32                         ` Bug in Ada (SuSe 10.2) ? Randy Brukardt
2008-02-22 16:10                           ` billjones6789
2008-02-22 19:21                             ` Georg Bauhaus
2008-02-22 21:29                               ` Vadim Godunko
2008-02-22 21:39                                 ` Robert A Duff
2008-02-23 10:16                               ` billjones6789
2008-02-22 19:52                             ` Randy Brukardt
2008-02-23 10:36                               ` billjones6789
2008-02-26  0:32                                 ` Randy Brukardt
2008-02-26 16:46                                   ` billjones6789
2008-02-26 20:53                                     ` Randy Brukardt
2008-02-27  1:05                                     ` Robert A Duff
2008-02-27 10:06                                       ` billjones6789
2008-02-27 17:49                                         ` Robert A Duff
2008-02-28  0:30                                           ` Randy Brukardt
2008-02-28 15:33                                             ` Robert A Duff
2008-03-06 17:46                                             ` Adam Beneschan
2008-02-21  0:31               ` Jeffrey R. Carter
2008-02-21  0:35                 ` Jeffrey R. Carter
2008-03-06 11:55                   ` Colin Paul Gloster
2008-02-21  0:55               ` tmoran
2008-02-21  8:08                 ` billjones6789
2008-02-21  9:11                 ` Alex R. Mosteo
2008-02-21 23:01                   ` Randy Brukardt [this message]
2008-02-22 16:43                 ` Adam Beneschan
2008-02-22  9:06               ` Stephen Leake
2008-02-22  5:40       ` Gautier
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox