Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!olivea!apple!agate!shelby!neon!torrie From: torrie@cs.stanford.edu (Evan J Torrie) Newsgroups: comp.sys.mac.programmer Subject: Re: MPW C/fp performance Message-ID: <1991Jan8.070341.10357@Neon.Stanford.EDU> Date: 8 Jan 91 07:03:41 GMT References: <1991Jan7.170126.1900@vax5.cit.cornell.edu> Sender: torrie@Neon.Stanford.EDU (Evan James Torrie) Distribution: comp Organization: Computer Science Department, Stanford University Lines: 25 tcd@vax5.cit.cornell.edu writes: > I am using MPW C (v. 3.0) to write a program that involves >a lot of floating point calculation. The code that is generated >appears incredibly inefficient (although I'll admit that I have >never looked at the output from another compiler before, so I >don't have much basis for comparison). I have learned to use a lot >of temporary variables and eliminate explicit subscripting of arrays, >but some things appear impossible to get around. A typical section of >code that really bothers me is something like the following: > FMOVE FP7,FP0 > FADD.X (A3),FP0 > FMOVE FP0,FP7 You might want to try looking at Apple's recently released (and fairly much unsupported) GCC for MPW. GCC produces fairly efficient code for the 6888x series, certainly much better than MPW C has ever produced for me (factors of 2 or 3 times faster in some cases). -- ------------------------------------------------------------------------------ Evan Torrie. Stanford University, Class of 199? torrie@cs.stanford.edu Where can a nation lie when it hides its organic minds in a cellar dark and grim? They must be ... very dim.