Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!rutgers!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.misc Subject: Re: Answers, Chapter 2: to point or not to point Message-ID: <5220@lanl.gov> Date: 7 Nov 90 21:56:15 GMT References: <6243:Nov720:29:4090@kramden.acf.nyu.edu> Organization: Los Alamos Natl Lab, Los Alamos, N.M. Lines: 22 From article <6243:Nov720:29:4090@kramden.acf.nyu.edu>, by brnstnd@kramden.acf.nyu.edu (Dan Bernstein): > In article <5088@lanl.gov> jlg@lanl.gov (Jim Giles) writes: > [...] >> Modula 2 C >> for i := 1 to N do p = &x[1][0]; q = p+N; >> x[1,i] := x[2,i] for (i=0; i> end; *p++ = *q++; > [...] > I believe that if you stated it correctly, the Convex compiler would be > able to optimize it (specifically, vectorize it) the way you want. I never claimed that a smart compiler _couldn't_ optimize the above. I gave it originally as an example of something which the compiler would have to do _extra_ work to recover information if the array code were preprocessed into pointers (which you _did_ suggest should be done). I specifically said that a smart compiler _could_ find the information again. With your stand against optimizers though, why do you claim that it's acceptable to put the compiler through all that extra work? J. Giles