Re: Is Fortran still faster than C for math applications?



Joe wrote:

In my experience, optimized C code is almost always faster than
optimized Fortran code. The one big exception for C performace has
always been optimization limitations due to aliasing, which often
prevents the use of vectorized loops. But, newer C compilers now
support attributes that allow you to restrict pointer aliasing.

In many cases it might be true. C tends to be a lower level language, which in many cases will result in smaller, faster code. This is likely to be more true for character and simpler integer operations than for complicated floating point operations, though.

As most numerical (number crunching) algorithms require a reasonable
amount of fixed point operations, such as array indexing, it might be
that C would be faster in those cases.   It will depend very much
on the specific code in question.

I would say that there are enough variables not to make a general
statement either way.

-- glen

.