Re: Slow execution with NaNs under Solaris 8 and 9 [message #34390 is a reply to message #34381] |
Tue, 11 March 2003 12:10  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
"Ivar Christopher" wrote in message
> We've recenty purchaced a couple of fast, new Sun systems, one running
> Solaris 8 and the other Solaris 9. At some point I discovered that
> some existing IDL code was running much slower than I expected on
> these systems. After much tracking down, it turns out that when
> various functions, including where() and trig functions, are called on
> data that contain IEEE Not a Numbers (NaNs), the execution speed drops
> by up to an order of magnitude.
FWIW, this problem doesn't show up in slowlaris 7 (using the attached
program which may or may not be an appropriate test). These numbers were
gathered while performing a backup but that should slow both tests down more
or less equally.
IDL> test_slowlaris
{ sparc sunos unix 5.4.1 Jan 16 2001 32 64}
No NaNs: 30.699895
With NaNs: 25.150906
% Program caused arithmetic error: Floating illegal operand
-Rick
pro test_slowlaris
print, !version
bigArray = FINDGEN(10,1000000)
start = SYSTIME(/SECONDS)
null = WHERE(bigArray gt 290000.)
null = WHERE(bigArray lt 100000.)
null = WHERE(bigArray eq 123456.)
null = sin(bigArray)
print, 'No NaNs:', SYSTIME(/SECONDS) - start
bigArray[0,*] = !values.f_nan
bigArray[4,*] = !values.f_nan
start = SYSTIME(/SECONDS)
null = WHERE(bigArray gt 290000.)
null = WHERE(bigArray lt 100000.)
null = WHERE(bigArray eq 123456.)
null = sin(bigArray)
print, 'With NaNs:', SYSTIME(/SECONDS) - start
end
|
|
|