Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!rpi!sci.ccny.cuny.edu!phri!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.society.futures Subject: Re: C's sins of commission (was: (pssst...fortran?)) Message-ID: <63212@lanl.gov> Date: 17 Sep 90 22:36:50 GMT References: <3643@vexpert.dbai.tuwien.ac.at> Organization: Los Alamos Natl Lab, Los Alamos, N.M. Lines: 54 From article <3643@vexpert.dbai.tuwien.ac.at>, by mst@vexpert.dbai.tuwien.ac.at (Markus Stumptner): > [...] > - Do not use the increment and decrement operators (++ and --) > > - Do not use pointer incrementing for sequential array access > > This was a year ago, and my memory is fuzzy. As far as I remember, > according to the manual, in most cases using ordinary > assignment/expression syntax and incrementing an array index will be > MUCH FASTER since the compiler has more freedom in keeping values in > registers instead of having to store them back in memory immediately. This is quite possibly true. You see, pointers are unrestricted alias generators. If you have a subroutine which (say) copies one array into another: for (i=0;i