comp.lang.ada
 help / color / mirror / Atom feed
* compilation time [was Re: Magnavox consultant]
@ 1994-10-20  7:29 tmoran
  1994-10-20 14:22 ` Norman H. Cohen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: tmoran @ 1994-10-20  7:29 UTC (permalink / raw)


I just observed a make, compile with full optimization, and link
of 2200 lines in 24 source files, in almost exactly one minute
on my 486 (Janus Ada 83 compiler).  That translates to about 22
million lines in a solid week.  But if the source files are
small, and the compiler is loaded once for each file, and there
is inadequate disk caching, things could go downhill in a hurry.
My limited experience is that C compilers generally load once,
with a bunch of source files on the command line, while Ada
compilers more often compile one file per compiler invocation.
Is that generally true?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: compilation time [was Re: Magnavox consultant]
  1994-10-20  7:29 compilation time [was Re: Magnavox consultant] tmoran
@ 1994-10-20 14:22 ` Norman H. Cohen
  1994-10-20 18:15 ` Kent Mitchell
  1994-10-20 19:05 ` compilation time [was Re: Magnavox consult Richard L. Conn
  2 siblings, 0 replies; 6+ messages in thread
From: Norman H. Cohen @ 1994-10-20 14:22 UTC (permalink / raw)


In article <385686$501@news.delphi.com>, tmoran@bix.com writes: 

|> I just observed a make, compile with full optimization, and link
|> of 2200 lines in 24 source files, in almost exactly one minute
|> on my 486 (Janus Ada 83 compiler).  That translates to about 22
|> million lines in a solid week.  But if the source files are
|> small, and the compiler is loaded once for each file, and there
|> is inadequate disk caching, things could go downhill in a hurry.

A 2200-line program is not likely to have many with clauses per
compilation unit.  The performance of some compilers is sensitive to the
number of with clauses, because of the time taken to read in the
associated information from the program library (so much so that the GNAT
team decided it would be faster to reparse the source of the with'ed
units).  Thus it cannot be assumed that this test scales up to a large
program with complex dependencies among compilation units.

|> My limited experience is that C compilers generally load once,
|> with a bunch of source files on the command line, while Ada
|> compilers more often compile one file per compiler invocation.
|> Is that generally true?

It depends on the compiler.  The AIX Ada 6000 compiler, for example,
mimics the traditional "cc" command-line interface, allowing multiple
source files, .o files, and .a (archive) files to be specified on the
command line.  All the source files are compiled and the resulting object
files are linked with the other .o files named on the command line, using
archived object files as needed.  (This compiler, originally developed by
Oliver Cole Systems, is now maintained as an OCS product, under a new
name that slips my mind at the moment.)

--
Norman H. Cohen    ncohen@watson.ibm.com



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: compilation time [was Re: Magnavox consultant]
  1994-10-20  7:29 compilation time [was Re: Magnavox consultant] tmoran
  1994-10-20 14:22 ` Norman H. Cohen
@ 1994-10-20 18:15 ` Kent Mitchell
  1994-10-20 19:05 ` compilation time [was Re: Magnavox consult Richard L. Conn
  2 siblings, 0 replies; 6+ messages in thread
From: Kent Mitchell @ 1994-10-20 18:15 UTC (permalink / raw)


tmoran@bix.com wrote:
: My limited experience is that C compilers generally load once,
: with a bunch of source files on the command line, while Ada
: compilers more often compile one file per compiler invocation.
: Is that generally true?

No I would not say this is generally true but there are some compilers that
could have this restriction.  I that were a restriction, then the compile
time could go up quite dramtically.

--
Kent Mitchell                   | One possible reason that things aren't
Technical Consultant            | going according to plan is .....
Rational Software Corporation   | that there never *was* a plan!



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: compilation time [was Re: Magnavox consult
  1994-10-20  7:29 compilation time [was Re: Magnavox consultant] tmoran
  1994-10-20 14:22 ` Norman H. Cohen
  1994-10-20 18:15 ` Kent Mitchell
@ 1994-10-20 19:05 ` Richard L. Conn
  1994-10-25 18:08   ` Eric C. Newton
  2 siblings, 1 reply; 6+ messages in thread
From: Richard L. Conn @ 1994-10-20 19:05 UTC (permalink / raw)


One thing to keep in mind about your metrics is the KIND of Ada
code being compiled.  If there is heavy reliance on subunits,
for example, a lot of small files containing many subunits will
probably take longer than a lot of small files with no subunits.

Rick






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: compilation time [was Re: Magnavox consult
  1994-10-20 19:05 ` compilation time [was Re: Magnavox consult Richard L. Conn
@ 1994-10-25 18:08   ` Eric C. Newton
  1994-10-25 22:23     ` Robert Dewar
  0 siblings, 1 reply; 6+ messages in thread
From: Eric C. Newton @ 1994-10-25 18:08 UTC (permalink / raw)


I regularly work with a one-million line C++ program that takes about
six hours to compile on a '486/33 with SCO Unix and the GNU C++ compiler.

LOC are counted with 'wc'.
Few, if any templates are used.
Optimizations are used.
Generated code is not counted.

Of course, this statistic, like many of the others given here are quite
silly.

-Eric




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: compilation time [was Re: Magnavox consult
  1994-10-25 18:08   ` Eric C. Newton
@ 1994-10-25 22:23     ` Robert Dewar
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Dewar @ 1994-10-25 22:23 UTC (permalink / raw)



one million lines of C++ compiling in 6 hours on a 486.

That sounds reasonable, GNAT will generally compile about the same speed
as g++. On my thinkpad, a 75MHz 486 with no 2nd-level cache, it takes 
about 50 minutes to compile the GNAT sources, which are about 150,000 
lines of Ada.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1994-10-25 22:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-10-20  7:29 compilation time [was Re: Magnavox consultant] tmoran
1994-10-20 14:22 ` Norman H. Cohen
1994-10-20 18:15 ` Kent Mitchell
1994-10-20 19:05 ` compilation time [was Re: Magnavox consult Richard L. Conn
1994-10-25 18:08   ` Eric C. Newton
1994-10-25 22:23     ` Robert Dewar

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