Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!usc!rutgers!cmcl2!lanl!cochiti.lanl.gov!jlg From: jlg@cochiti.lanl.gov (Jim Giles) Newsgroups: comp.lang.c Subject: Re: low level optimization Message-ID: <21527@lanl.gov> Date: 16 Apr 91 17:06:17 GMT References: <1991Apr9.213601.12309@agate.berkeley.edu> <15828@smoke.brl.mil> Sender: news@lanl.gov Organization: Los Alamos National Laboratory Lines: 23 [...] For any commercial-quality system, I would be amazed if an equally competent implementation of nearly any algorithm in Fortran and C gave much edge to Fortran. [...] We've been through this again and again. 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 to each other, to globals, and to any locals to which the & operator has been applied. There is not a single significant optimization technique that is not inhibited to some extent or other by aliasing. Some C implementations have local extensions (using #pragma statements) that allow the programmer to declare that certain variables are not aliased - all very non-portable. Some experimental systems allow the compiler to do restricted types of interprocedural analysis to detect aliasing - this is non-standard since it violates separate compilation constraints. I've never seen a purely standard conforming C compiler that can come close to Fortran. J. Giles