separate keyword and separate compilation with GNAT? 
Author Message
 separate keyword and separate compilation with GNAT?

Someone complained about the incredible length of time it would take to
compile a "large" system with GNAT due to GNAT's method of also compiling
subunits.  A similar complaint could be made about the need to "re-compile"
EVERYTHING higher on the dependency tree.

HOWEVER: I know of TWO (independent) commercial compilers with "library"
systems which get corrupted any time you make the slightest change to the
dependency tree.  Add a 'with' or a 'separate' and you have to remove
the library and start over.  One of the compilers was used for a system
that had 14,000+ source files and took 16 hours to compile.  That particular
library structure also seemed to get corrupted if a resource problem
(not an Ada error) interrupted compilation of one unit.  Subsequent units
would raise complaints about other units (already with-ed many times).
Start over! (sigh).

The m{*filter*}of the story is ... GNAT's not so bad!  GNAT's ADVANTAGE in the
above scenario is that it can compile in parallel as many files as you have
CPUs--both of the above compilers severely restricted multiple access to
libraries.

P.S. Some don't include spelling on their list of talents.  Let's do
them a favor and not propagate examples of incorrect spelling
(i.e., "seperate").  (But I'm NOT suggesting we flame the person whose
typo has been propagated.)
--
---------------------------------------------------------------------------
W. Wesley Groleau (Wes)                                Office: 219-429-4923
Magnavox - Mail Stop 10-40                               Home: 219-471-7206

---------------------------------------------------------------------------



Sun, 27 Dec 1998 03:00:00 GMT  
 separate keyword and separate compilation with GNAT?



Quote:
>P.S. Some don't include spelling on their list of talents. ...

I once worked on an Ada compiler with a guy who said, in response to
another compiler-writer griping about subunits, "It's easier to
implement subunits than to spell the word 'separate'."

- Bob



Sun, 27 Dec 1998 03:00:00 GMT  
 separate keyword and separate compilation with GNAT?

GNAT knows how to spell :-)

     1. seperate (q)
        |
        >>> Incorrect spelling of keyword "separate"

     2. procedure j is
     3. begin
     4.    null;
     5. end;



Sun, 27 Dec 1998 03:00:00 GMT  
 separate keyword and separate compilation with GNAT?

Wes said

"Someone complained about the incredible length of time it would take to
compile a "large" system with GNAT due to GNAT's method of also compiling
subunits.  A similar complaint could be made about the need to "re-compile"
EVERYTHING higher on the dependency tree."

Let's not confuse two things here. The issue of requiring a complete
subtree to be present for compiling is quite a different issue from
"recompiling" withed units from source.

Yes, I have heard people complain that this must be "incredibly
inefficient" or somesuch, but in fact I am not at all sure it is
even slightly inefficient. The trouble with the library approach is
that:

  first: you have to write the library when you compile, a step that
        we avoid completely.

  second: you have to read in all the data from the library. Often the
        library data is much bigger than sources, and just the I/O
        can be significant.

  third: you have to process/relocate etc. the data, which can be
        time consuming.

It is not at *all* obvious that recompiling from source is slower.

As I have noted before, the only versions of GNAT that anyone uses are
debugging versions which are dramatically slowed down by huge amounts
of debugging junk (we can be talking about a factor of several in
speed here). Still GNAT seems quite reasonably fast, and indeed it
is still typically the case that more time is spent in the backend
than the frontend, especially if optimization is turned on. Code
is not compiled for withed units, so any alledged slow down from
recompiling withed units can only affect the frontend time anyway.

As Wes notes, there are many other advantages of the source based
approach -- and indeed improved compilation performance may be
one of them :-)



Sun, 27 Dec 1998 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Separate keyword and separate compilation with GNAT?

2. Loop separate sounds, separate intervals

3. New Moscow ML with separate compilation

4. Moscow ML with separate compilation

5. Macros and separate compilation

6. library circularities (was: Macros and separate compilation)

7. circular modules (was: Re: Macros and separate compilation)

8. Modules and separate compilation

9. Preparsing and separate compilation in Modula-2.

10. Separate Compilation using Compile-Time Macro Dependencies (a hack)

11. Separate Compilation/Package interdependencies...

12. Portabilty and Separate Compilation

 

 
Powered by phpBB® Forum Software