On Feb 3, 2005, at 10:14 AM, Gabriel Sechan wrote:

Yes I did. I disagree.

And you would be wrong, nonetheless.

http://compilers.iecc.com/comparch/article/93-09-134

> Fortran subroutine calls have *extra* semantic information: all arrays
> passed are guarenteed not to be aliased. This let the MIPS compiler
> get the kernal of (DAXPY? some linpack kernal) right. When inlined the
> same code ran much slower because the compiler inserted stalls under
> the assumption that the arrays might be aliased.

There is a fundamental language difference that conforming compilers cannot ignore. C/C++ compilers *must* assume that arrays/pointers can alias with one another. Fortran compiles can assume that arrays/pointers cannot alias with one another.

It wasn't until C99 that this problem got papered over with the "restrict" keyword. At least the language now has the ability to remove this difference. However, C compilers have a long way to go to catch up with baseline Fortran optimizers.

Until then Fortran still rules the roost for developing efficient complex mathematical calculations quickly.

Besides, your statement about whichever language being the most familiar being the best is belied by all of the programmers who changed languages. If your argument were true, no one would ever change languages voluntarily.

-a

--

KPLUG-List mailing list
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to