Xref: utzoo comp.lang.fortran:4116 comp.lang.c:34162 Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sun-barr!newstop!texsun!letni!mic!convex!rosenkra From: rosenkra@convex.com (William Rosencranz) Newsgroups: comp.lang.fortran,comp.lang.c Subject: Re: Fortran vs. C for numerical work Message-ID: <109145@convex.convex.com> Date: 22 Nov 90 08:40:33 GMT References: <21884@orstcs.CS.ORST.EDU> Sender: news@convex.com Followup-To: comp.lang.fortran Organization: Convex Computer Corporation; Richardson, TX Lines: 23 In article <21884@orstcs.CS.ORST.EDU> ghe@comphy.PHYSICS.ORST.EDU.UUCP (Guangliang He) writes: >It may not be true any more. A friend of mine brought a little fortran >program (It is two big do loops with some instrinsic function calculation in >the loop.) and the C translation of the fortran program. We compiled two >program on a IBM RISC System 6000/530 with xlc and xlf. To my surprise, the >excutable from C is faster than the excutable from Fortran by a few percent. this says nothing about the *language*, only the *compilers*. actually, it may not be that suprising when u consider that the 6000 runs unix and unix needs a good C compiler. IBM may have spent more time on the C compiler than the fortran compiler, figuring that more people may use C on the box than fortran. believe it or not, i have seen similar behavior on crays (cft77 vs scc [actually vc at the time], though also by only a few percent). this does say that this particluar code seems well suited for C on the 6000 today. it implies that C is not a bad language for numerical work, if performance is the criterion. -bill rosenkra@convex.com -- Bill Rosenkranz |UUCP: {uunet,texsun}!convex!c1yankee!rosenkra Convex Computer Corp. |ARPA: rosenkra%c1yankee@convex.com