Re: Strange memory problem (/nozero) weird [message #18408] |
Thu, 23 December 1999 00:00 |
R.G. Stockwell
Messages: 363 Registered: July 1999
|
Senior Member |
|
|
Curiouser and curiouser.
On WinNT4.0 WS, running IDL 5.2.1, the
/nozero keyword does not cause the bytarr
function to return garbage. It is still
filled with zeros, HOWEVER it does run faster.
0.34099996sec for nozero=1
to
0.48100007sec for nozero=0
Strange.
;;;;;;;;;;;;; idl code to demonstrate the above
t = systime(1)
temp = bytarr(1000,1000,25,/nozero)+10B
timeelapsed=-t + systime(1)
w = where(temp ne 10b,count)
print,'where ne 10',count
print,'Time elapsed (/nozero):',timeelapsed,'sec'
help,temp
t = systime(1)
temp = bytarr(1000,1000,25)+10B
timeelapsed=-t + systime(1)
w = where(temp ne 10b,count)
print,'where ne 10',count
print,'Time elapsed:',timeelapsed,'sec'
help,temp
end
--
���`����,��,�`����`����, ��,�`
R.G. Stockwell
Colorado Research Associates
3380 Mitchell Lane
Sent via Deja.com http://www.deja.com/
Before you buy.
|
|
|