Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Wes Bauske <wsb@paralleldata.com>
Subject: Re: Perf. of F77 on Alpha
Date: Thu, 13 Nov 1997 13:40:48 -0600	[thread overview]
Message-ID: <8dacce90101e291ed2e40acdf498a6e1.axp-list@archive.invalid> (raw)

Tom/David,

Actually the divide may be as much trouble as the sqrt() function.
Some tests I did indicate any Alpha divide (float/int) is slow.
The table lookup for sqrt() is probably the fastest technique for
an approximation. Maybe you could modify your code to move the
divide/sqrt() out of the loop?? Can it be pre-computed and reused
repeatedly? Maybe you can eliminate both the divide and sqrt()
with a table lookup/interpolate?? That works if you "know" the
range of values the code will use and you can tolerate the
error in the calculations. Stuff I do can tolerate such errors
if the table is reasonably finely sampled.

Wes

Tom Linden wrote:
> 
> You don't want to write your own routine (reinvent the wheel)  If you did,
> the most efficient would be a table lookup for a seed to a Newton=Raphson
> loop.  But how are you going to inline it?  with F77 this wont fit into an
> arithmetic statement function, with C you could build  macro, but this
> is a regressive computing technique.  Its the compiler!  Find a copiler
> that does the inlining.  I haven't looked at it but I would bet that DEC
> Fortran does this, I think they used to on the VAX.
> 
> On Thu, 13 Nov 1997, David van der Spoel wrote:
> 
> > Yes I have profiled my app, 80 % of the time is in one loop that has
> > the sqrt, or actually 1/sqrt which the DEC F77 compiler recognizes
> > and puts in a call to rsqrtf. However, the compiler should inline the
> > code for the rsqrt and then pipeline my loop, which now it doesn't.
> >
> > So I will probably write F77 code for the 1/sqrt (I have C-code for it)
> > unless I can find a smarter compiler
> >
> > Groeten, David.
> > ________________________________________________________________________
> > Dr. David van der Spoel               Biomedical center, Dept. of Biochemistry
> > s-mail:       Husargatan 3, Box 576,  75123 Uppsala, Sweden
> > e-mail: spoel@xray.bmc.uu.se  www: http://zorn.bmc.uu.se/~spoel
> > phone:        46 18 471 4205          fax: 46 18 511 755
> > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >
> >
> > --
> > 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

-- 
Regards,

Wes

-- 
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

             reply	other threads:[~1997-11-13 19:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-13 19:40 Wes Bauske [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-11-13 22:16 Perf. of F77 on Alpha Claus Denk
1997-11-13 22:13 Toon Moene
1997-11-13 22:08 Wes Bauske
     [not found] <346B7C36.F55B1A2@cica.es>
1997-11-13 21:41 ` Michal Jaegermann
1997-11-13 22:34   ` Tom Linden
1997-11-13 20:16 Barksdale, Ray
     [not found] <346B57C0.41C6@paralleldata.com>
1997-11-13 19:52 ` Michal Jaegermann
     [not found] <Pine.SGI.3.96.971113110232.6251A-100000@zorn>
1997-11-13 16:00 ` Tom Linden
1997-11-13 16:18   ` David van der Spoel
1997-11-13 10:06 David van der Spoel
1997-11-13  9:25 Stefan Schroepfer
     [not found] <Pine.SGI.3.96.971112231225.4609A-100000@zorn>
1997-11-13  6:37 ` Maurice W. Hilarius
1997-11-12 22:23 David van der Spoel
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox