Re: sqrt 10x slower in 2.0.7-19 than 2.0.6-9 ???

Andreas Jaeger (aj@arthur.rhein-neckar.de)
01 Oct 1998 22:53:51 +0200


>>>>> John Salmon writes:

> I am encountering some very strange performance numbers with sqrt in
> the glibc math library on the alpha.

> Executive summary: sqrt from the glibc-2.0.6-9.alpha.rpm appears to be
> over 10 times faster than sqrt in glibc-2.0.7-19.alpha.rpm.

> [...]
> So the question is:

> Why is the 2.0.7 sqrt so much slower than the 2.0.6??
> [...]

Have a look at PR libc/423 (via
http://www-gnats.gnu.org:8080/cgi-bin/wwwgnats.pl) and check exactly
why the following fix has been made (ignore the timestamp, the fix is
not in 2.0.6):

1997-09-04 13:19 Richard Henderson <rth@cygnus.com>

* sysdeps/alpha/w_sqrt.S: Removed.
* sysdeps/alpha/fpu/e_sqrt.c: New. Obey -mieee and -mieee-with-inexact
and build a version that is as fast as possible given the constraint.
[PR libc/423].

In a nutshell: The code is slower - but it gives better (exacter)
results.

Andreas

-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de