Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: Joachim Wesner <joachim.wesner@frankfurt.netsurf.de>
To: "John Lyon <SPP>" <lyon@tinman.dartmouth.edu>
Subject: Re: Fast Compilers for Linux
Date: 1998/05/22	[thread overview]
Message-ID: <3565A475.3940EB48@frankfurt.netsurf.de> (raw)
In-Reply-To: 3565885C.41C6@tinman.dartmouth.edu


Hi,

John Lyon wrote:
> 
> If you pick up ftp://ftp.arsc.edu/pub/mpp/docs/bmguide.ps.Z, there's a
> table which gives values of the speeds of the various routines: roughly
> 100 clocks for scalar transcendtals and 25-45 for vector versions. The
> document is an optimization guide for single processor code on the T3E,
> but it does have some useful things to say about how high level code can
> be structured for better performance.
> 
> John


Do you know for what argument range those result apply ?? I ask because
my initial testing of the actual libm and and some other routines I will
try to use shows the surprising result that, at least for sin, cos and
tan and also the hyperbolic equivalents, most of the time is spent in
argument reduction instead of approximating. The upshot is that, if Cray
tested only for small arguments, their sin routine for example, is NOT
any faster than the actual libm !!

My measured execution time on a LX 533 (1 tick ~ 2 ns) (all routines
were tested with random arguments from 0 to x)

		0..0.3		0..10		0..300

actual libm
sin		0.18 us		0.45 us		0.51 us
cos		0.20 us		0.46 us		0.52 us
tan		0.30 us		0.63 us		0.69 us

goto's routine (sin/cos kernel in assembler)
sin		0.12 us		0.36 us		0.49 us
cos		0.15 us		0.39 us		0.52 us

my alternative routine (C, will be changed to assembler later)
sin		0.22 us		0.27 us		0.27 us
cos		0.26 us		0.26 us		0.26 us

Cray routines	range = ?
sin		0.24 us
cos		0.26 us

			
As one can see, for larger arguments, most of the time is spent in
argument reductions. Similar increases can be seen for libm and tan and
the xxxh functions. If the cray numbers only apply for arguments up to ~
1, it's not much faster. I sincerely hope not, I think I will know soon.
Another way to follow would be to combine my way of argument reduction
with goto's routine (goto@statabo.rim.or.jp), he still seems to use the
original libm subroutine written in C, which is way too complicated and
long, much longer than the sin or cos kernel.

HOWEVER

**Unfortunatelly**, a "real" coprocessor like in a Pentium can still
keep the competition with those numbers and it's even more accurate !

For a sad comparison, Pentium MMX 233:		:-((

sin		0.21 us		0.32 us		0.32 us
cos		0.21 us		0.32 us		0.33 us


Joachim



  reply	other threads:[~1998-05-22  4:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-08  4:00 Fast Compilers for Linux James Sternberg
1998-05-08  4:00 ` James D. Freels
1998-05-08  4:00   ` Dr. Ram Samudrala
1998-05-10  4:00     ` James Sternberg
1998-05-09  4:00   ` Toon Moene
1998-05-09  4:00     ` James D. Freels
1998-05-09  4:00       ` Toon Moene
1998-05-20  4:00         ` Matt Kennel
1998-05-21  4:00           ` Toon Moene
1998-05-21  4:00             ` Greg Lindahl
1998-05-21  4:00               ` John Lyon <SPP>
1998-05-21  4:00                 ` Greg Lindahl
1998-05-22  4:00                   ` John Lyon <SPP>
1998-05-22  4:00                     ` Joachim Wesner [this message]
1998-05-22  4:00                       ` Greg Lindahl
1998-05-22  4:00                         ` Joachim Wesner
1998-05-22  4:00                           ` Andi Kleen
1998-05-23  4:00                           ` Michal Jaegermann
1998-05-23  4:00                           ` James H. Cloos Jr.
1998-05-25  4:00                             ` Huw Davies
1998-05-22  4:00                 ` Joachim Wesner
1998-05-22  4:00                   ` Fast Cray libm on axp/Linux, was " Joachim Wesner
1998-05-22  4:00                     ` Greg Lindahl
1998-05-23  4:00                     ` Fast Cray libm on axp/Linux, more results Joachim Wesner
1998-05-09  4:00 ` Fast Compilers for Linux Toon Moene
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