comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: about replicate_inplace
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: about replicate_inplace [message #35891 is a reply to message #35890] Wed, 23 July 2003 10:57 Go to previous messageGo to previous message
Richard Younger is currently offline  Richard Younger
Messages: 43
Registered: November 2000
Member
Also, there's the /NOZERO keyword to all the array creation routines that
neglects to zero out the data.

T = systime(1)
b = bytarr(nreg, nreg, /NOZERO)
replicate_inplace, b, 1b
print, systime(1) - T, ' seconds, BYTARR/nozero and REPLICATE_INPLACE'

Using /NOZERO seems to speed BYTARR and REPLICATE_INPLACE things up to the
speed of MAKE_ARRAY, but it's still not quite as good as addition.

With nreg=3000,

0.37500000 seconds, BYTARR and [*]
0.35899997 seconds, BYTARR/nozero and [*]
0.14100003 seconds, BYTARR and REPLICATE_INPLACE
0.12500000 seconds, BYTARR/nozero and REPLICATE_INPLACE
0.10899997 seconds, REPLICATE_INPLACE
0.12500000 seconds, MAKE_ARRAY
0.093999982 seconds, onebyte+BYTARR

Best,
Rich

--
Richard Younger
(de-spammed return address)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Leading zeros in Format
Next Topic: IDL 6.0 is released!

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 06:10:31 PDT 2025

Total time taken to generate the page: 0.00672 seconds