low level optimization

Doug Gwyn gwyn at smoke.brl.mil
Wed Apr 17 13:30:49 AEST 1991


In article <21527 at lanl.gov> jlg at cochiti.lanl.gov (Jim Giles) writes:
>We've been through this again and again.

Indeed.

>C can't hold a candle to Fortran for array manipulation because
>Fortran is free to assume that array arguments to procedures are
>_not_ aliased to each other or to globals.  C must assume that all
>pointers are possibly aliased ...  There is not a single significant
>optimization technique that is not inhibited to some extent or other
>by aliasing.

The latter is a gross overgeneralization, and in any event the
assertion is simply not true.  There are SOME circumstances under
which aliasing must be assumed to be possible, but by no means ALL
circumstances.

I wasn't particularly referring to array-intensive applications
anyway, because most interesting "scientific" applications that
I have encountered require more flexibility than the use of fixed
arrays provides.  Each language should be dealt with on its own
terms, not treated as an inferior substitute for one's favorite
language.

>I've never seen a purely standard conforming C compiler
>that can come close to Fortran.

Well, I have.



More information about the Comp.lang.c mailing list