comp.lang.ada
 help / color / mirror / Atom feed
From: rracine@myremarq.com (Roger Racine)
Subject: Re: Apex vs GNAT on solaris
Date: 1999/12/08
Date: 1999-12-08T13:49:46+00:00	[thread overview]
Message-ID: <384e52db.779218947@newsnew.draper.com> (raw)
In-Reply-To: 82ku6s$jhi$1@nnrp1.deja.com

On Wed, 08 Dec 1999 06:35:08 GMT, Robert Dewar <dewar@gnat.com> wrote:

>In article <384cfdb3.691883075@newsnew.draper.com>,
>  rracine@myremarq.com (Roger Racine) wrote:
>> Many people will assume that the default options are the most
>> reliable options.
>
>They will assume wrong. For example, in the case of GNAT,
>we let -O0 be the default because that is traditional in
>all gcc compilers. We make inlining off the default, because
>that seems more compatible with -O0 as the default.
>

That is a pretty questionable reason for creating a default.  Perhaps
compiler documentation should state reasons for using the various
options.  Of course, a given vendor might not want to say "turn
optimization on only as a last resort, since it is not well tested",
but certainly ACT (from what you say) should tell their users to turn
it on.

>> Others will assume that the default options are the best
>> options.
>
>They will assume wrong, there is no "best options", there is
>only the appropriate options for your particular use.
>

I do not know about your experience, but for me, with embedded system
compilers (which tend to have comparatively few users compared to
workstation compilers), for numerous languages over the years, it has
always been dangerous to change the default optimization options.  ACT
might want to reconsider their default.

>> The default options generally turn out to be the most
>> reliable because most people use them
>
>Not true in the GCC/GNAT world, virtually all users plan on
>setting at least -O1 for actual production work (-O0 is almost
>never suitable for production work, it is usually only used
>while debugging, since it is easier to debug unoptimized code).
>

How do you know this?  As an ACT user, I have never been asked about
my settings (-O2).  And the GCC world is pretty big.  You certainly
have not asked all those users.

>> and bugs will be discovered and corrected sooner than those to
>> be found using the non-default options.
>
>Well you may guess this, but it is wrong for gcc. Far more code
>is run with optimization on. It is not common to find bugs that
>depend on the optimization level in the gcc technology (since
>the backend is mature), but when they do arise, they are just
>as likely to be bugs that show up ONLY with optimization off.
>

This is not a guess, it is my experience with other compilers.  And,
as you have said many times, do not believe everything you read on
newsgroups.  :-)

As I said above, for GNAT I personally do use -O2, but only because I
did a bit of checking (such as the optimization level used in your
Make files and for the ACVC tests, or whatever they are called now),
but there are many others who have similar experiences and have not
done any checking.  They will use the default.  By the way, why don't
you use -O3?

>> The same can be said for tasking.
>
>Again, this can be misleading. For example, on Solaris, the
>system thread support is definitely buggy, and indeed we have
>found it impossible to provide full Annex D support on Solaris,
>even in realtime mode (it is out of the question in non-real
>time, i.e. non-root mode). The FSU threads is FAR more reliable.
>The choice of defaults is not based on reliability or accuracy
>[which would dictate FSU], but usability, most people want to
>use system threads [I assume this is what you mean by Posix
>threads, your designation is confusing, since of course FSU
>is also Posix compliant].
>

This is confused.  My message said nothing about Posix vs FSU.  But
you seem to be agreeing with me that it is better to use the default
for threads.  By the way, unless you have changed something, your
version of FSU Threads is -not- Posix compliant, as we have discussed
previously.  ACT is using an old version that was based on one of the
proposed Posix standards.

>> and generally assum  that the compiler vendors knows what they
>> are doing when the defaults are created.
>
>We know EXACTLY what we are doing when we create the defaults,
>it just does not happen to correspond to any of your guesses.
>

Nor does it seem to indicate much logic.  "We do it because everyone
else using the common back end does it.  We certainly do not want
anyone to use the default."  :-)

>> They are giving what they think should be the most
>> common values for the options.
>
>Nope, that's plain wrong in the case of gcc! The important thing
>in our mind is to be consistent with other uses of gcc, so that
>the usage will be the same for GNAT, gnu C, g++ etc.

How would the usage be different if you had a different (better)
default?  For gnu C, users would need to say "gcc -O1 XXX.c" to get
the first level of optimization.  For Ada, users could say the same
thing, or they could say "gcc XXX.adb" to get that same level
(assuming your default were -O1).  Why do you consider that to be an
overriding reason?

Roger Racine




  reply	other threads:[~1999-12-08  0:00 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-07  0:00 Apex vs GNAT on solaris reason67
1999-12-07  0:00 ` reason67
1999-12-07  0:00 ` Robert Dewar
1999-12-07  0:00   ` reason67
1999-12-08  0:00     ` Robert Dewar
1999-12-08  0:00       ` reason67
1999-12-08  0:00         ` Robert Dewar
1999-12-08  0:00         ` Larry Kilgallen
1999-12-08  0:00         ` Robert A Duff
1999-12-07  0:00   ` Roger Racine
1999-12-07  0:00     ` Larry Kilgallen
1999-12-07  0:00     ` Samuel T. Harris
1999-12-07  0:00     ` Jean-Pierre Rosen
1999-12-07  0:00     ` David Starner
1999-12-08  0:00       ` Robert Dewar
1999-12-08  0:00     ` Ted Dennison
1999-12-08  0:00     ` Robert Dewar
1999-12-08  0:00       ` Roger Racine [this message]
1999-12-08  0:00         ` Larry Kilgallen
1999-12-08  0:00           ` Roger Racine
1999-12-08  0:00             ` Larry Kilgallen
1999-12-08  0:00             ` tmoran
1999-12-09  0:00         ` Robert Dewar
1999-12-09  0:00           ` Roger Racine
1999-12-09  0:00             ` Mike Silva
1999-12-10  0:00               ` Robert Dewar
1999-12-09  0:00             ` Larry Kilgallen
1999-12-10  0:00               ` Robert Dewar
1999-12-16  0:00             ` Stefan Skoglund
1999-12-08  0:00       ` Robert A Duff
1999-12-07  0:00 ` reason67
1999-12-07  0:00 ` reason67
1999-12-07  0:00   ` Robert Dewar
1999-12-07  0:00     ` reason67
1999-12-07  0:00 ` reason67
1999-12-07  0:00   ` Robert Dewar
1999-12-07  0:00     ` Vladimir Olensky
1999-12-07  0:00       ` Vladimir Olensky
1999-12-09  0:00       ` Geoff Bull
1999-12-09  0:00         ` Vladimir Olensky
1999-12-10  0:00           ` Vladimir Olensky
1999-12-09  0:00         ` Vladimir Olensky
1999-12-07  0:00     ` reason67
1999-12-08  0:00       ` Robert Dewar
1999-12-08  0:00         ` reason67
1999-12-07  0:00 ` reason67
1999-12-07  0:00 ` reason67
1999-12-07  0:00 ` reason67
replies disabled

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