From: Claus Denk <denk@cica.es>
Subject: Re: Perf. of F77 on Alpha
Date: Thu, 13 Nov 1997 23:16:22 +0100 [thread overview]
Message-ID: <5e9282cef392ed198db2aa62a645071e.axp-list@archive.invalid> (raw)
David van der Spoel wrote:
> >
> Actually, I just did. I had C-code from when we used to do these
> computation on i860 chips. The DEC compiler does *not* inline intrinsic
> functions, at least I have not found a way how to do it.
> The fortran compiler will inline it for me I hope...
Hi David,
wouldn't the compiler need the library functions (as sqrt) in
assembler or in its internal format in order to be able to inline
them ? At the moment of inlining, the compiler needs to know
about register usage and all that, so it think that the compiler
would probably need an internal representation of sqrt in order to
be able to inline it.
If you write your own fortran code for sqrt, it suppose it should
be quite difficult to write a function that comes even close to
the Digital "-math_library fast" sqrt, as these functions are
heavily optimized for the alpha. And even if your new sqrt now
might be inlined, the result would probably be a slower code.
The following (stupid) program:
PROGRAM SQRTTEST
REAL*8 A(0:9),SUM
DO I=0,9
A(I)=1.0D10*(I+1)
ENDDO
DO K=1,10000000
DO I=0,9
A(I)=dsqrt(A(I))
ENDDO
ENDDO
SUM=0.0d0
DO I=0,9
SUM=SUM+A(I)
ENDDO
write(*,*) SUM
END
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.
By the way, does this mean that you are optimizing gromacs for the
alpha ?
regards, Claus
--
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
next reply other threads:[~1997-11-13 22:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-11-13 22:16 Claus Denk [this message]
-- strict thread matches above, loose matches on Subject: below --
1997-11-13 22:13 Perf. of F77 on Alpha 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
1997-11-13 19:40 Wes Bauske
[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