Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sol.ctr.columbia.edu!caen!uflorida!ufqtp!bernhold From: bernhold@qtp.ufl.edu (David E. Bernholdt) Newsgroups: comp.lang.fortran Subject: Re: Array Notation Message-ID: <1225@orange19.qtp.ufl.edu> Date: 4 Jan 91 18:49:00 GMT References: <1991Jan04.154747.18673@convex.com> Reply-To: bernhold@qtp.ufl.edu (David E. Bernholdt) Organization: University of Florida Quantum Theory Project Lines: 25 In article <1991Jan04.154747.18673@convex.com> bleikamp@convex.com (Richard Bleikamp) writes: >The moral of these examples is ARRAY NOTATION is NOT a direct replacement for >DO loops. They are not always interchangeable. Array notation is sometimes >a convenient shorthand for simple array operations, but will not inherently >allow compilers to generate better code. However every array syntax loop _does_ have an equivalent DO syntax. This is the important point, since the complaints are against the array syntax. >The real problem for array notation is that scalar compilers don't known >enough to do a good job of converting array notation back into an appropriate >DO loop without introducing unnecessary loops and temps. So, as I said before, it is the fault of the compiler, not the standard. If the array notation is slow, complain to the vendor. If the extra analysis makes the compilation slow, put in a switch and let the _user_ decide if they want fast compilation or fast execution. There is ample precedent(sp?) for this idea in the existing optimization switches available on most compilers. -- David Bernholdt bernhold@qtp.ufl.edu Quantum Theory Project bernhold@ufpine.bitnet University of Florida Gainesville, FL 32611 904/392 6365