From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <9611262218.AA12442@moene.indiv.nluug.nl> Date: Tue, 26 Nov 96 23:18:19 +0100 From: Toon Moene Subject: Re: using linux instead of osf David Mosberger-Tang wrote: [ Answering the following: ] > I ran some code to check these functions before I made my > statement and when I used the sinf and cosf functions the test > program I was using showed no improvement. So does this mean that > my libm is is broken? > Always possible, but very unlikely. You can look at > s_sinf.o and k_sinf.o in libm using objdump -d. You'll > find that all fp ops are done in single precision (muls, > lds, etc) so, fundamentally, the routines are certainly > not broken (at least not in the way you suggest ;-). Naively, one would expect that, to compute the sine of some argument in single precision would require *less* fp operations than to get it correct up to double precision. E.g., because almost all calculations _we_ perform are single precision, on my NeXT I could always get away with a simple 200 line library of exp, log, etc. - coded by someone of our local nuclear physics lab - that simply cut some corners here and there. Those routines were, on average, twice as fast as the ones provided by NeXT. > On the Alpha, there is only two reasons why single > precision might give improve execution time: > (a) Your code is memory bandwidth limited. Yep, saw exactly that when we got an early Alpha on loan in January '93 - the execution time difference between the same model, same input, when running 32-bit calculations or [the same number of] 64-bit ones was of the order of 60 %, i.e. it took 1.6 times as much time to pull the (twice larger) data stream through. Hope this helps, Toon. -- Toon Moene (toon@moene.indiv.nluug.nl) Saturnushof 14, 3738 XG Maartensdijk, The Netherlands Phone: +31 346 214290; Fax: +31 346 214286 URL: http://www.knmi.nl/hirlam -- 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