From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Thu, 13 Nov 1997 14:34:09 -0800 (PST) From: Tom Linden Subject: Re: Perf. of F77 on Alpha In-Reply-To: <199711132141.OAA25393@ellpspace.math.ualberta.ca> I have written optimizing fortran compilers and from my experience a hand unrolled Newton-Raphson (I think I last used 3 times for double with table lookup seed worked very well. Michal is also right about the index calculations. If you don't unroll, the next best thing is to use shadow variables, i.e. use the address as the induction variable. As I recall, the LDA instruction on alpha works well for this and probably avoids pointer load delay stalls in the pipeline. Obviously, you can always improve any single program, but you don't want to do it every time, which is why I insist that it should be done in the code generator. Lean on cygnus to implement the optimization. That backend is too messy for me! On Thu, 13 Nov 1997, Michal Jaegermann wrote: > > > > The following (stupid) program: > [calculates a lot of square roots and stores them in an array - snip] > > takes 21 seconds when compiled with g77 -O2 -funroll-loops and 11 > > seconds when compiled with Digital f77 -fast on our 500 MHz 21164. > > This difference should be mainly due to the efficient implementation > > of the Digital sqrt library function. > > Actually if this would be really true that would be very surprising. > It is really hard to slow down any sane implementation of sqrt to > that extent. Newton-Raphson converges very fast and there are some > shortcuts (Alpha does not have a sqrt in a hardware, does it?). > > In a light of recent annoucements about egcs based g77 I would strongly > suspect that this is array index calculations which kill here g77 > performance. Anybody with egcs-g77 handy to check this hypothesis? > > Fixing sqrt is likely a magnitude times easier than fixing a compiler > code generator and optimizer. :-) > > Michal > > -- > To unsubscribe: send e-mail to axp-list-request@redhat.com with > 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com > > -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com