From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,100c510dac09e617 X-Google-Attributes: gid111c93,public From: luke@navo.hpc.mil (Luke Lonergan) Subject: Re: MFlops Comparison using g77 (bad news) - bench.tgz (0/1) Date: 1997/09/23 Message-ID: <6078oc$5dv@bgtnsc02.worldnet.att.net>#1/1 X-Deja-AN: 274683848 References: <5vqs28$3el@news-rocq.inria.fr> <3425c740.24725060@netnews.worldnet.att.net> <6060pv$kn6@news.cis.okstate.edu> Organization: AT&T WorldNet Services Reply-To: luke@navo.hpc.mil Newsgroups: comp.os.linux.alpha On 22 Sep 1997 14:53:51 GMT, jwest@jwest.ecen.okstate.edu (Jim West) wrote: >I'm wondering if an optimizing compiler sould pick this up even without the >explicit definition of nx_r. Can anyone explain why it wouldn't? Well, it might all be unnecessary if we could gain the wisdom of Robert's implementation :-) The one thing I was trying to do was get as close to the FORTRAN version's efficiency on the non-Alpha platforms. I succeeded on the Pentium Pro and Pentium machines. One reason why is that the FORTRAN code benefits greatly from hardcoding of dimensions. That is, if you explicitly put the 1002,1002 numbers in the FORTRAN kernel, you get a great (~20%) performance increase. I think I am doing the same thing when I localize the reference to the nx dimension in the C kernel by putting it into stack (and through optimization into register). I did this after looking at the assembler code in the two versions of the FORTRAN kernel, with and without the hardcoded dimensions and found a lot of address resolution in one where the other simply had a $### telling it how far to advance the reference. I can't think of a way to explicitly code this same approach in FORTRAN, though I am pretty sure that a lot of other compilers do the same thing I did in the C kernel. Luke