Fortran computes cosine 300 times faster than C (on Sun3)

Art Boyne boyne at hplvli.HP.COM
Fri Mar 10 01:35:11 AEST 1989


chris at mimsy.UUCP (Chris Torek) writes:

>the Fortran compiler can be certain that COS(2.5) does nothing but
>compute cosines, and can change the code to
>
>	TMP = 4.0 * COS(2.5)
              ^^^^^^^^^^^^^^ make that COS(2.5)**4
>10	CONTINUE

Art Boyne, boyne at hplvla.hp.com



More information about the Comp.lang.c mailing list