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

Home » Public Forums » archive » Re: How to speed up large FOR loops?
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: How to speed up large FOR loops? [message #79804] Tue, 10 April 2012 12:39 Go to previous message
Saurav Dhital is currently offline  Saurav Dhital
Messages: 4
Registered: April 2012
Junior Member
Hi Craig, yup, that is a big problem, which I had to correct a while
back. I create a FITS structure of a fixed size at the beginning and
fill it within the FOR loop and trim it at the end.

I only concatenate arrays so as to put them into fields in the FITS
table (for e.g., x = [[x1],[x2],[x3]] and struct.field = x).

One more thing that I don't do: I don't even use the where() function
in my matching as where() searches through the entire array EVERY
single time. If you are matching large arrays, where() ends up being
the biggest bottleneck.

~Saurav
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Creating netCDF file
Next Topic: How to speed up large FOR loops?

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

Current Time: Wed Oct 08 15:28:09 PDT 2025

Total time taken to generate the page: 0.00424 seconds