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

Home » Public Forums » archive » idl speed question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
idl speed question [message #65629] Sat, 14 March 2009 10:13
oxfordenergyservices is currently offline  oxfordenergyservices
Messages: 56
Registered: January 2009
Member
I have the following strange result

a=double(1.0)
for i=0,10000 do begin
for j=0,10000 do begin
a=a+1.0
endfor
endfor

takes 13 seconds whereas

a=double(1.0)
b=double(1.0)
c=double(1.0)
d=double(1.0)
e=double(1.0)
for i=0,10000 do begin
for j=0,10000 do begin
a=a+1.0
b=b+1.0
c=c+1.0
d=d+1.0
e=e+1.0
endfor
endfor

takes 60 seconds? I thought the overhead with IDL was in the loops
rather than the computing?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Adding a stack of array in quadrature sum
Next Topic: Re: HistoPlot Bug ?

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

Current Time: Wed Oct 08 19:51:32 PDT 2025

Total time taken to generate the page: 0.00567 seconds