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

Home » Public Forums » archive » Re: Cyclic array interfaces
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: Cyclic array interfaces [message #40189 is a reply to message #40187] Tue, 13 July 2004 18:48 Go to previous messageGo to previous message
cedricl is currently offline  cedricl
Messages: 8
Registered: July 2004
Junior Member
Mark Hadfield <m.hadfield@niwa.co.nz> wrote in message news:<cd1no6$q54$1@newsreader.mailgate.org>...
> Analysis be dammed, I counted them! And got a result that disagrees with
> your analysis:

:) I should have remembered that programmers are always wrong when
they don't use a profiler!

I'm still surprised by your result, though. Perhaps IDL knows that
findgen(n) is a temporary in the first case (thus assigning its
address directly to a) and not in the second case. I don't have access
to IDL now, but I would try

n = 10000000 & a = fltarr(n) & b = findgen(n) & t0 = systime(1) & a =
b & t1 = systime(1) & a[0] = b & t2 = systime(1) & print, t1-t0, t2-t1

I'll see if I can do it tomorrow (or if anybody feels like doing it
now...)

Thanks for the heads up!

Cedric
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Collection of different size arrays?
Next Topic: IDL FFT Source Code

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

Current Time: Sat Nov 29 07:28:56 PST 2025

Total time taken to generate the page: 2.47523 seconds