Article View: comp.sys.mac
Article #21207Re: Compiler efficiency
From: Richard Siegel
Date: Wed, 04 Nov 1987 13:59
Date: Wed, 04 Nov 1987 13:59
44 lines
2834 bytes
2834 bytes
In article <1881@dasys1.UUCP> raylau@dasys1.UUCP (Raymond Lau) writes:
>Although not a compiler efficiency problem, I have noticed that when LSC
>links together a file which uses a certain library, it includes the entire
>libary even if only one procedure/func in the lib is actually called.
>When it links in a project, each obj
>ect in the project (or whatever you wish to term it) is linked in in
>its entirety even if only one proc/func w/in it is actually called.
This is correct, and that is done when doing a Check Link on a project
for the simple reason that it's much faster.
>I know that this id documented... I'd guess that it's probably done bec.
>it's faster.... and I can understand that. But when the Build
>Application (or code/da) is invoked, I feel that we should have the option
>of having the final form of the prgm optimized.
In fact, LightspeedC *does* smart-link on a project-file basis;
if there's a module in a project, and that module contains routines that
never get called, that module will not get built into the final application.
Likewise, if you're using a project file as a library in another
project, that library will be smart-linked as well when you build an
Application.
>Before, using the MacTraps w/2.01, I've had relatively small prgms (20-35k)
>come out 3-8k smaller than they do now under the 2.11 MacTraps.
>Those numbers add up.
This is for the simple reason that the modules that you use
from MacTraps are bigger; this isn't the linker's fault. The 2.11 MacTraps
is simply larger than the 2.01 MacTraps.
I agree that it would be desirable to link on a procedure-by-procedure
basis, but there are tradeoffs: project files will get bigger, and
build times will get slower.
--Rich
**The opinions stated herein are my own opinions and do not necessarily
represent the policies or opinions of my employer (THINK Technologies, Inc).
* Richard M. Siegel | {decvax, ucbvax, sun}!harvard!endor!singer *
* Customer Support | singer@endor.harvard.edu *
* Symantec, THINK Technologies Division. (No snappy quote) *
Technical Details
Message-ID:
<3105@husc6.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!elroy!cit-vax!oberon!ll-xn!husc6!endor!singerReferences:
<3987@watdragon.waterloo.edu> <1881@dasys1.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!elroy!cit-vax!oberon!ll-xn!husc6!endor!singer From: singer@endor.harvard.edu (Richard Siegel) Newsgroups: comp.sys.mac Subject: Re: Compiler efficiency Message-ID: <3105@husc6.UUCP> Date: Wed, 4-Nov-87 08:59:10 EST Article-I.D.: husc6.3105 Posted: Wed Nov 4 08:59:10 1987 Date-Received: Sat, 7-Nov-87 11:02:44 EST References: <3987@watdragon.waterloo.edu> <1881@dasys1.UUCP> Sender: news@husc6.UUCP Reply-To: singer@endor.UUCP (Richard Siegel) Organization: THINK Technologies, Inc., Bedford, MA Lines: 44 Summary: LightspeedC *does* smart-link applications!