Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!cornell!rochester!PT.CS.CMU.EDU!K.GP.CS.CMU.EDU!lindsay From: lindsay@K.GP.CS.CMU.EDU (Donald Lindsay) Newsgroups: comp.arch Subject: Re: 2-D arrays (was: RISC is a nasty no-no) Message-ID: <1020@PT.CS.CMU.EDU> Date: 3 Mar 88 04:45:10 GMT References: <179@wsccs.UUCP: <696@nuchat.UUCP> <284@scdpyr.UUCP> <25699@linus.UUCP> <2378@pdn.UUCP> Sender: netnews@PT.CS.CMU.EDU Organization: Carnegie-Mellon University, CS/RI Lines: 20 2-D arrays should not in general be implemented as vector-of-pointer-to- vector. The Burroughs 6700 had to do it this way, and it was a defect of the machine. This implementation method can be useful in specific cases. In general, it has bad properties. For one, Fortran can't use it. Fortran specifies that you can step past the end of one row and find yourself at the front of the next. (Or rather, columns .. ah, yes, Fortran! ) For another, it isn't uniform w.r.t. rows-versus-columns. One is preferred, the other penalized. The problem is that an algorithm may accidentally be coded to vary the "wrong" subscript more often than the "right" one. The performance hit (and the ensuing "optimization") are needless. -- Don lindsay@k.gp.cs.cmu.edu CMU Computer Science