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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f891f,9d9325e2ee8461aa X-Google-Attributes: gidf891f,public X-Google-Thread: 10204d,960b26935b9a4a0c X-Google-Attributes: gid10204d,public X-Google-Thread: 103376,53ac8da1f34d53c4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-25 06:45:58 PST Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!udel!news.mathworks.com!news.duke.edu!eff!blanket.mitre.org!linus.mitre.org!spectre!emery From: emery@goldfinger.mitre.org (David Emery) Newsgroups: comp.lang.misc,comp.software.international,comp.lang.ada Subject: Ada link times Date: 25 Jan 1995 14:45:58 GMT Organization: The Mitre Corp., Bedford, MA. Message-ID: References: <1995Jan12.143131.2083@midway.uchicago.edu> <3fh4l1$mpm@Starbase.NeoSoft.COM> <3fuskb$hae@Starbase.NeoSoft.COM> <3g0rc9$o4j@Starbase.NeoSoft.COM> <3g3jkp$3he@gnat.cs.nyu.edu> NNTP-Posting-Host: goldfinger.mitre.org In-reply-to: dewar@cs.nyu.edu's message of 24 Jan 1995 14:15:37 -0500 Xref: nntp.gmd.de comp.lang.misc:10536 comp.software.international:1358 comp.lang.ada:18321 Date: 1995-01-25T14:45:58+00:00 List-Id: >Certainly it is clear that linking an Ada program should take no more >or less time thank linking an equivalent C program, and certainly GNAT >(and I would think lots of other Ada compilers) achieve this >equivalence in practice. I have two comments on this. Some of this discussion depends on how you define "link". By "link" in the following, I mean the step whereby you bind all of the previously compiled units to produce an executable program, including those checks required by the Ada language. Now, as Robert Dewar knows (but momentarily forgot ;-), there are some additional Ada semantics to this step, over and above the traditional linker. Specifically, the 'linker' must determine and build a proper order of elaboration. This often turns out to be a non-trivial computation. In a compiler that will remain nameless (you know who you are!), the algorithm to calculate the order of elaboration had an N**4 term in it (where N is the number of units). It took several years to isolate this problem, in part because the 4th-order term wasn't always the 'predominating factor', but it popped up at exactly the wrong times, i.e. when linking very large numbers of units. So, once you get past the required "link-time" Ada semantics, then linking should be identical to the times required by C and other languages for symbol resolution and construction of the binary image. GNAT has done some clever things to minimize the time spent on Ada-specific semantics... What Robert Eachus was referring to was a higher-level issue. Often, large link times indicate a proliferation of units, or a situation where determining the order of elaboration becomes complex. Anecdotally, such situations resemble other "metrics", such as coupling and cohesion, in that they MAY indicate a design problem. dave -- --The preceeding opinions do not necessarily reflect the opinions of --The MITRE Corporation or its sponsors. -- "A good plan violently executed -NOW- is better than a perfect plan -- next week" George Patton -- "Any damn fool can write a plan. It's the execution that gets you -- all screwed up" James Hollingsworth -------------------------------------------------------------------------