Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!mit-eddie!uw-beaver!cornell!vax5.cit.cornell.edu!tcd From: tcd@vax5.cit.cornell.edu Newsgroups: comp.sys.mac.programmer Subject: MPW C/fp performance Message-ID: <1991Jan7.170126.1900@vax5.cit.cornell.edu> Date: 7 Jan 91 21:01:26 GMT Distribution: comp Lines: 23 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 when FADD.X (A3),FP7 would produce the desired result. What I am wondering is the following: 1) Does version 3.1 of MPW offer any improvement in this regard? 2) How do other Macintosh compilers (C or otherwise) compare? 3) Does anyone know of a book or other source that describes tips, techniques, pitfalls, etc. for a Macintosh programmer interested in execution speed for floating point calculations? Thanks, Tim Dorcey