From: "Wes Bauske" <wsb@paralleldata.com>
To: axp-list@redhat.com
Subject: Re: An sqrt() experiment
Date: Tue, 26 Jan 1999 22:15:04 +0000 [thread overview]
Message-ID: <36AE3E68.B6CDB726@paralleldata.com> (raw)
In-Reply-To: 199901261939.LAA05186@netcom6.netcom.com
Munagala V. S. Ramanath wrote:
>
> Hi,
>
> This may be of interest to the math lib aficionados: Sun released a
> freely redistributable floating point math library (full sources)
> around 1996 called fdlibm. I've found it at:
> ftp://ftp.imar.ro/pub/trieste/math/netlib/fdlibm
>
> The code is not 64-bit aware but makes very interesting reading
> including the comments. In particular, the comments in e_sqrt.c
> suggested what seemed like an interesting approach, so I did a
> quick-and-dirty C coding job for timing purposes. It runs about 4
> times faster than the version in libm but libffm routine runs an
> additional 36% faster, presumably because of the hand-tuned scheduling.
>
> Here are the timing results on my 533MHz 21164a (UX2 Ruffian):
>
> y = 30865358776.919712, time = 2.037109 secs. [sqrt] <-- libm
> y = 30865358776.919712, time = 0.470703 secs. [sqt]
>
> y = 30865358776.919712, time = 0.303711 secs. [sqrt] <-- libffm
> y = 30865358776.919712, time = 0.475586 secs. [sqt]
>
> Just looking at the code, it seems that a hand-tuned version of sqt()
> below may do better than the libffm version, but I don't understand
> the architecture of the 21164a well enough to try it.
>
Be careful. Your test puts as much weight on the
performance of rand() as it does on sqrt(). A better
source of test numbers would be to just init x to N
and decrement it on each iteration. That way you're
only measuring sqrt().
Wes
next prev parent reply other threads:[~1999-01-26 21:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-01-26 19:39 An sqrt() experiment Munagala V. S. Ramanath
1999-01-26 20:05 ` Andrei A. Dergatchev
1999-01-26 20:28 ` Andrei A. Dergatchev
1999-01-26 21:20 ` Joachim Wesner
1999-01-26 22:15 ` Wes Bauske [this message]
1999-01-29 6:28 ` Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
1999-01-26 22:07 Munagala V. S. Ramanath
1999-01-26 22:14 Munagala V. S. Ramanath
1999-01-26 22:51 Munagala V. S. Ramanath
1999-01-27 18:30 ` Jonathan L Dubois
1999-01-28 8:17 ` Joachim Wesner
1999-01-28 15:18 Munagala V. S. Ramanath
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