From: Andrei A. Dergatchev <A.Dergatchev@tn.utwente.nl>
Subject: Re: sqrt performance
Date: Wed, 03 Mar 1999 19:51:22 +0100 [thread overview]
Message-ID: <36DD84AA.629B0DA2@tn.utwente.nl> (raw)
In-Reply-To: <199903031321.HAA0000010299@localhost>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]
Hi,
> [snip]
> I plan to compile the C code as well as a FORTRAN translation today and
> compare them. I will also generate assembly using the C and FORTRAN codes
> and see if I can figure out what to do to write assembly code that will
> work both places.
>
sub1.f:
...
do i=1 ,n
t2 = i*dt
t2 = t2*t2
ts = sqrt( rs2*s(i) + t2 )
tg = sqrt( rg2*s(i) + t2 )
j(i) = ts + tg
end do
...
Looking at the structure of your code I think it *should* be possible
to get some acceleration exploiting regulatiry of sqrt argument:
some_value*constant_for_this_cycle+delta^2*(i++)^2
for i=1,N
I'm thinking about division of one argument over other.
Can you expect any relation of general nature like
some_value*constant_for_this_cycle<<delta^2*(i++)^2
or vice versa or anything in this style ?
>
> Reginald Beardsley
>
> ------------------------------------------------------------------------
> Exploration Software Consultants Inc.
>
> Voice: 972-379-0557 email: rhb@acm.org
> Fax: 972-379-0558
> ------------------------------------------------------------------------
Regards,
Andrei
next prev parent reply other threads:[~1999-03-03 18:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-03-03 13:21 sqrt performance esci
1999-03-03 18:51 ` Andrei A. Dergatchev [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-03-03 20:53 esci
1999-03-03 21:40 ` Andrei A. Dergatchev
1999-03-04 5:15 ` Michal Jaegermann
1999-03-04 18:30 ` Joachim Wesner
1999-03-03 2:26 esci
1999-03-03 9:27 ` Andrei A. Dergatchev
1999-03-03 11:59 ` Kazushige Goto
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