Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site noao.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!astrovax!noao!allan From: allan@noao.UUCP Newsgroups: net.physics Subject: Re: VMS vs. Unix (programs) Message-ID: <361@noao.UUCP> Date: Wed, 27-Jun-84 14:23:24 EDT Article-I.D.: noao.361 Posted: Wed Jun 27 14:23:24 1984 Date-Received: Thu, 28-Jun-84 06:34:08 EDT References: <590@sdcsla.UUCP> Organization: Natl. Optical Astronomy Obs. Tucson AZ USA Lines: 23 A little extra information on the timing of my matrix multiplication program. Following a suggestion (I'm afraid I forget from whom), I changed the declaration of the loop counters to be register int's. This speeded things up from 64 seconds to 53 seconds; a fair gain. I was a bit surprised and very pleased to see how much improvement the declaration register float *pa, *pb, *pc; and the use of pointer incrementing does for the timing. Of course, like most things, it is obvious with hindsight. Much of the time of the original program is spent in calculating the addresses of the array elements. I cannot think of a way of forcing fortran to do this incrementing in the 'obviously sensible' way, although as you point out, a good optimiser should do it for you. I conceed. C is faster than fortran when you write your programs correctly. Peter Allan Kitt Peak National Observatory Tucson, Az UUCP: {akgua,allegra,arizona,decvax,hao,ihnp4,lbl-csam,seismo}!noao!allan ARPA: noao!allan@lbl-csam.arpa