[comp.sys.mac.programmer] MPW C & 68881

msurlich@faui44.informatik.uni-erlangen.de (Matthias Urlichs ) (06/14/88)

In article <13735@comp.vuw.ac.nz> newbery@rata.vuw.ac.nz (Michael Newbery) writes:
> Life is too short to spend it writing assembler.

But sometimes you just have to. (This came about as a result of computing
Mandelbrot sets :-) )
At least, I did have to -- I wrote a short & hopefully tight floating-point
subroutine in MPW C, turning on -mc68881, wasn't impressed with the speed
at large, and decided to take the plunge and look at the code.

Gasp. Two out of three statements looked like this:
  FMOVE.X FP7,SomeLocal(A6)
  FMOVE.X SomeLocal(A6),FP7

After generally throwing out all those lines (result: SomeLocal got unused)
that same code went two times faster.
Throwing out my inner loop and coding it myself (no more
  FMOVE.X RegOne,FP7
  Fsomething RegTwo,FP7
  FMOVE.X FP7,RegThree
) got me another 30% as the compiler generally had its own idea about
"register" declarations and whether to actually use them.

So the question: Is there any C compiler that'll do better?
(It better run under MPW because we're stuck with it;
besides that, the environment IS very good.)
How about MPC C 3.0 when it comes out? (I was using MPW 2.02.)

-- 
Matthias Urlichs     CompuServe: 72437,1357  Delphi: URLICHS
Rainwiesenweg 9      Phone: +49+911-574180
8501 Schwaig 2       NetMail: m_urlichs@msn.rmi.de
West Germany              or: (r)eply and (h)ope