Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!pyramid!ctnews!starfish!cdold From: cdold@starfish.Convergent.COM (Clarence Dold) Newsgroups: comp.lang.c Subject: Re: Fortran computes cosine 300 times faster than C (on Sun3) Message-ID: <965@starfish.Convergent.COM> Date: 13 Mar 89 19:28:01 GMT References: <688@friday.UUCP> Distribution: na Organization: Convergent Technologies, San Jose, CA Lines: 15 From article <688@friday.UUCP>, by fritz@friday.UUCP (Fritz Whittington): >>I chanced upon a segment of code that runs approximately 300 times faster in >>FORTRAN than in C. I have tried the code on Sun3(OS3.5) and on Sun4(OS4.0) . . . >> for(i=0;i<262144;i++) >> tmp=cos(2.5)*cos(2.5)*cos(2.5)*cos(2.5); . . . What about a Floating Point Chip? Is Fortran configured to use the FPU by default, while the C compiler uses software floating point? -- Clarence A Dold - cdold@starfish.Convergent.COM (408) 434-2083 ...pyramid!ctnews!starfish!cdold P.O.Box 6685, San Jose, CA 95150-6685