Newsgroups: comp.sys.mac.programmer Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!b-tech!mingin.engin.umich.edu!news From: billkatt@mondo.engin.umich.edu (billkatt) Subject: Re: MPW compiler bugs (was: interface war) In-Reply-To: <1990Feb14.004350.14475@oracle.com> Message-ID: <1990Feb14.204332.24800@caen.engin.umich.edu> Organization: University of Michigan CAEN Date: Wed, 14 Feb 90 20:43:32 GMT In article <1990Feb14.004350.14475@oracle.com> you write: >> From: jln@acns.nwu.edu (John Norstad) >> In article <1046@watserv1.waterloo.edu> bmwrkshp@watserv1.waterloo.edu ( >> Wrkshp Id - Sys Design ) writes: >> > But I'm sure THINK C is still an order of magnitude >> > faster. Don't know what that linker is doing. Sure takes its own >> > sweet time even on Mac II's. >> >> As I understand it, one of the reasons is that MPW's linker is much >> smarter. For example, it lets you direct individual routines within a >> single module to different segments, and it eliminates dead code. I'm not >> sure about all this, though. >> >John, I will agree with you, though, about the Linker. Think C >includes code a whole file at a time -- it won't pick out individual >routines from a file. MPW C will do this. What I don't get is why >Think C hasn't changed this by now -- they've had a few versions to do >it. Heck, in high school when I wrote the Rascal compiler for the >Mac, I wrote a linker that did dead code analysis and picked out a >routine at a time. Surely, Mike Kahl could do it. Think C DOES indeed remove dead code, ever since version 3.0. It doesn't seem to do quite as good a job as MPW 3.0, but a good job none the less. To remove dead code, just check the 'Smart Link' check box when you build your app/DA/whatever. You can go out and prove it to yourself by writing a program which uses one small routine from the ANSI library, and building it to disk. Whereas the ANSI library is 27K long, your program will come out to about 5 or 6K. -Steve Bollinger billkatt@mondo.engin.umich.edu