Article View: comp.lang.misc
Article #1967Re: Aggressive optimization
From: Greg Lindahl
Date: Thu, 08 Nov 1990 03:13
Date: Thu, 08 Nov 1990 03:13
17 lines
1265 bytes
1265 bytes
In article <6PX6-O@xds13.ferranti.com> peter@ficc.ferranti.com (Peter da Silva) writes: >What's wrong with: > > if(array_a_and_array_b_overlap) > use_safe_code > else > use_fast_code_that_doesn't_work_for_aliased_arrays. Of course, this won't catch every situation where aliasing can occur. However, you might be happy to know that Cray's Fortran compiler will insert tests into runtime code to see if particular loops are vector or scalar, in situations where a variable determines the behavior. I've yet to see a C compiler which does this, although some (Convex) do some compile-time checking for aliasing in array references. See my reply to Dan for situations where this won't catch all Fortran-style non-aliased expressions.
Technical Details
Message-ID:
<1990Nov8.031353.10405@murdoch.acc.Virginia.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mcnc!uvaarpa!murdoch!astsun.astro.Virginia.EDU!gl8fReferences:
<2701@l.cc.purdue.edu> <5009@lanl.gov> <6PX6-O@xds13.ferranti.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mcnc!uvaarpa!murdoch!astsun.astro.Virginia.EDU!gl8f From: gl8f@astsun.astro.Virginia.EDU (Greg Lindahl) Newsgroups: comp.lang.misc Subject: Re: Aggressive optimization Message-ID: <1990Nov8.031353.10405@murdoch.acc.Virginia.EDU> Date: 8 Nov 90 03:13:53 GMT References: <2701@l.cc.purdue.edu> <5009@lanl.gov> <6PX6-O@xds13.ferranti.com> Sender: news@murdoch.acc.Virginia.EDU Organization: Department of Astronomy, University of Virginia Lines: 17