Mathematical expression syntax (was: C vs. Fortran)

Barnacle Wes wes at obie.UUCP
Wed Jul 6 00:30:56 AEST 1988


> In article <20509 at beta.lanl.gov> jlg at beta.lanl.gov (Jim Giles) 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.  About 4 years ago, I was involved in a project that required
writing several software tools.  A friend was working on a CPU simulator
for an odd little computer, to be used for testing the software that ran
on the little beastie.  In the design phase, it was calculated (somehow)
that the finished simulator would have a simulation time - real time
ration on the order of 12:1 to 20:1.  This was on a VAX-11/780 with FPA.

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.  Was it worth it?  He thought so, I thought so.  You decide.  VAX
Fortran seems to be pretty good at optimizing computed gotos, BTW.
-- 
                     {hpda, uwmcsd1}!sp7040!obie!wes
           "Happiness lies in being priviledged to work hard for
           long hours in doing whatever you think is worth doing."
                         -- Robert A. Heinlein --



More information about the Comp.lang.c mailing list