From: Joachim Wesner <joachim.wesner@frankfurt.netsurf.de>
Subject: Fast Cray libm on axp/Linux, was Re: Fast Compilers for Linux
Date: 1998/05/22 [thread overview]
Message-ID: <3565E367.6382A19D@frankfurt.netsurf.de> (raw)
In-Reply-To: 35653FE4.6909CB26@frankfurt.netsurf.de
Yup, I suceeded in rewriting the first of the cray CAL routines (sin())
to AXP/linux/GCC. Incredibly it worked from the start. I will later
continue with the other routines.
So, what's the deal ???
YES, it's pretty fast !! And it does not suffer from slowdown for larger
arguments !!
I wrote before:
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
>>>>>>> Here we go ...... <<<<<<<<<
New converted CRAY routine
sin 0.20 us 0.20 us 0.20 us
Let's have a beer !!!
To be honest, the routine is a bit less accurate than the old libm. It's
not really true, what Cray implies in the paper, that it's always
accurate up to the last bits in contrast to their fast vector routines.
My "measurements" show that the old libdm based libm nearly always
achieves less than 0.5 ULB (units of last bit) error, this means the
result is always exact in the sense it's the same as the rounded version
of the infinite precision result. cray sin instead typically has ~ 1 ULB
error, some times up to 1.5 ULB, meaning that the last bit is often
incorrectly rounded and very few times the next bit is also wrong. BUT,
I think we can live with that, my own fast routine above even was a bit
worse in that respect.
So, what to do next ?? I will try to convert all the other routines
in the next days and test them (vector routines later !?) and try to put
them in libm compatable form.
Meanwhile, could somebody else, more knownledgable of that kind of legal
stuff, probably even in close contact of cray, find out what the exact
status of that stuff is and how we can put it in a freely distributable
form ??
Thanx, have a good night and Prost
Joachim
next prev parent 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
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 ` James H. Cloos Jr.
1998-05-25 4:00 ` Huw Davies
1998-05-23 4:00 ` Michal Jaegermann
1998-05-22 4:00 ` Joachim Wesner
1998-05-22 4:00 ` Joachim Wesner [this message]
1998-05-22 4:00 ` Fast Cray libm on axp/Linux, was " 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