From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4fe37c439e7925b4,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-20 07:56:32 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!swiss.ans.net!newsgate.watson.ibm.com!watnews.watson.ibm.com!ncohen From: ncohen@watson.ibm.com (Norman H. Cohen) Newsgroups: comp.lang.ada Subject: Re: compilation time [was Re: Magnavox consultant] Date: 20 Oct 1994 14:22:01 GMT Organization: IBM T.J. Watson Research Center Distribution: world Message-ID: <385ue9$kh6@watnews1.watson.ibm.com> References: <385686$501@news.delphi.com> Reply-To: ncohen@watson.ibm.com NNTP-Posting-Host: rios8.watson.ibm.com Date: 1994-10-20T14:22:01+00:00 List-Id: 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