Mathematical expression syntax (was: C vs. Fortran)

Walter Bays walter at garth.UUCP
Fri Jul 8 14:40:57 AEST 1988


In article <77 at obie.UUCP> wes at obie.UUCP (Barnacle Wes) writes:
>> ...........................................  The arithmetic IF is
>> obsolete and is only maintained for backwards compatibility.  I don't
>> know anyone who uses it for new code.
>
> I do.  ...  A friend was working on a CPU simulator My friend used
> arithmetic if statements in that program; he even used (gasp!) computed
> gotos.  The final run times were on the order of 3:1 - 4:1.  [As
> opposed to 12:1 to 20:1 projected otherwise on a VAX-11/780 with FPA.]
> Was it worth it?  He thought so, I thought so.  You decide.

I think not.  Keep the clearer, more maintainable code.  Take one
year's maintenance on the 780 and buy a new workstation to replace it.
(It doesn't even have to be ours, though of course that's preferable
:-)  Then you get run times better than 3:1, and continue saving on
both hardare and software maintenance.

You may ask, "Didn't I ever write tricky code for speed when
constrained to a particular hardware base?"  Of course.  "Did I ever
write tricky code for speed when there was no compelling reason to?"
Yes.  I admit it.  It's addictive.
-- 
------------------------------------------------------------------------------
My opinions are my own.  Objects in mirror are closer than they appear.
E-Mail route: ...!pyramid!garth!walter		(415) 852-2384
USPS: Intergraph APD, 2400 Geng Road, Palo Alto, California 94303
------------------------------------------------------------------------------



More information about the Comp.lang.c mailing list