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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,47bcf2a96491fe3e X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: separate keyword and separate compilation with GNAT? Date: 1996/07/10 Message-ID: #1/1 X-Deja-AN: 167802627 references: <9607101354.AA04329@most> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-07-10T00:00:00+00:00 List-Id: 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 :-)