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

Home » Public Forums » archive » Getting rid of large nested FOR loops
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
Getting rid of large nested FOR loops [message #40591] Tue, 17 August 2004 12:37
paulo is currently offline  paulo
Messages: 2
Registered: August 2004
Junior Member
Hi,

My code has three nested FOR loops (ops!)... well, the original code
in
FORTRAN has three nested FOR loops, but I'm re-writing (and improving)
it to IDL. I've read the J.D. Smith's tutorial about vectorizing but
the problem is that my inner loop is variable, it runs until the data
converges... and I'm dealing with lots of data, something like this:
for i=0,120...
for j=0,100...
for k=0,(variable: 2 to 1000) where I use BESELJ function (it
seems to be the weak point) and maybe the memory usage will slow me
down if I vectorize it... I know it sounds a little vague, but the
code is rather simple, but I need
it to be faster (it takes about 30 sec on a 1.2GHZ P4 / 1GB RAM). Is
it better to vectorize the whole thing (hard stuff!), the inner loop
or the outter loops? Or maybe another solution?

Thanks,
PJ Sim�es
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL implementation of the rolling ball background subtraction algorithm
Next Topic: error message

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

Current Time: Thu Oct 09 07:29:31 PDT 2025

Total time taken to generate the page: 1.27827 seconds