comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Source files organisation using gnat
Date: 1997/07/05
Date: 1997-07-05T00:00:00+00:00	[thread overview]
Message-ID: <dewar.868153463@merv> (raw)
In-Reply-To: gauthier-0107971637410001@193.50.185.13


Michel says

<<I guess that a library structure could have been a better solution than
throwing Ada into the same melting pot as other languages. The gnat
choice wastes much time of useless recompilations, that would have
been left aside with more information kept instead of rebuilt.
>>

People often guess this, but that is all it is, a guess! And in fact
it is almost certainly an incorrect guess. The advantage of the source
model, which you may note is also adopted by the AdaMagic front ends,
is that you do not have to write the tree when you do a compilation,
this definitely saves time, since the tree structures are big (Ada 83
libraries could quickly get very large).

As to "useless recompilations", actually nothing is uselessly recompiled.
The internal semantic tree of withed units is reconstructed from source,
but this is nothing like a full compilation, since the expensive part,
namely code generation is always skipped for with'ed units.

The question of whether to save information rather than recompute it is
a rather general one. You definitely cannot assume that it is always
more efficient to save than to recompute. 

There are certainly several approaches for significantly increasing
GNAT compilation speed by a large factor, but none of these involve
writing libraries. So far, speeding up compilation has been a lower
priority task. As the compiler gets into more solid shape, we can
spend more resources speeding up the performance of the generated code,
the runtime, and the compiler itself. But don't look for us to switch
to a library model, since this would actually *slow down* compilation,
and this is even more true when some of the speed ups we do plan get
done. 

In particular, the reading of with'ed files is a front end activity,
and so far the distributed versions of GNAT have been the full debugging
versions, with all sorts of very inefficient assertions around (just
take a look at the sources and grep for assert :-)

Now that the front end is pretty stable, we are experimenting to see if
it is time to generate the originally planned fast inlined version of the
front end. We are not sure that this will be a feature of the forthcoming
3.10 release, but it maybe, and if not it certainly will be in the 
subsequent release.

Actually most people who have run into slow compilation times in GNAt
are dealing with cases where the GCC back end is slow., and the issue
of library vs recreating from source is of course entirely irrelevant
to such problems.

For most, but not all, users, the compilation performance of GNAT, even
with the full assertions on, is acceptable. Certainly that is the way
I always run, and it takes me 13 minutes to compile the GNAT sources,
and under 5 minutes to recompile the GNAT library (nearly 300 units),
and that's fast enough that I don't bother to build the fast compiler yet.





  reply	other threads:[~1997-07-05  0:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-30  0:00 Source files organisation using gnat Laurentau
1997-06-30  0:00 ` Robert Dewar
1997-06-30  0:00 ` Robert Dewar
1997-07-01  0:00   ` Samuel T. Harris
1997-07-04  0:00     ` Robert Dewar
1997-07-05  0:00       ` Michael Feldman
1997-07-03  0:00   ` Steve Doiel
1997-07-04  0:00     ` Robert Dewar
1997-07-04  0:00       ` Michel Gauthier
1997-07-04  0:00         ` Robert Dewar
1997-07-03  0:00   ` David Haslam
1997-07-03  0:00     ` Robert Dewar
1997-07-09  0:00       ` Robert I. Eachus
1997-07-01  0:00 ` Michael F Brenner
1997-07-01  0:00   ` Robert Dewar
1997-07-02  0:00   ` Wes Groleau
1997-07-07  0:00     ` Michael F Brenner
1997-07-01  0:00 ` Geert Bosch
1997-07-02  0:00   ` Source files organisation using gnat: more Laurentau
1997-07-02  0:00     ` Robert B. Love 
1997-07-02  0:00       ` nasser
1997-07-03  0:00     ` Michael F Brenner
1997-07-03  0:00     ` Ian Caldwell
1997-07-01  0:00 ` Source files organisation using gnat Michel Gauthier
1997-07-05  0:00   ` Robert Dewar [this message]
1997-07-06  0:00     ` Geert Bosch
1997-07-07  0:00       ` Tucker Taft
1997-07-08  0:00       ` Robert Dewar
1997-07-08  0:00         ` nabbasi
1997-07-08  0:00           ` Robert Dewar
replies disabled

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