Fortran vs. C for numerical work

Guangliang He ghe at comphy.physics.orst.edu
Thu Nov 22 05:43:08 AEST 1990


In article <BGLENDEN.90Nov21003342 at mandrill.cv.nrao.edu> bglenden at mandrill.cv.nrao.edu (Brian Glendenning) writes:
>
>It is often stated that Fortran is better than C for numerical work.
>[Some deleted text here]

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.

>Brian
>--
>       Brian Glendenning - National Radio Astronomy Observatory
>bglenden at nrao.edu          bglenden at nrao.bitnet          (804) 296-0286

Guangliang He
ghe at physics.orst.edu
                            Guangliang He

                            ghe at PHYSICS.ORST.EDU
                            hegl at ORSTVM.BITNET



More information about the Comp.lang.c mailing list