04-25-2006 04:47 PM
04-25-2006 05:23 PM - edited 04-25-2006 05:23 PM
Message Edited by tlivingston on 04-25-2006 05:26 PM
04-26-2006 01:00 PM
As the previous poster mentioned, it's probably to your advantage to minimize the # of calls to "Transpose 2D Array." I don't think LabVIEW should need to allocate memory, but it would need to do a bunch of data shuffling.
I'd suggest you try benchmarking a technique that doesn't use auto-indexing. It sounds like the call to "Transpose 2D Array" is just to enable the option of auto-indexing, right? Well, another option is not to perform auto-indexing at all, but to use explicit indexing with the loop iteration counter "i". Depending on the processing you need to do, you can either explicitly slice out a 1 column Array Subset, or you could use 2 nested loops to process individual elements in the order you choose.
I would guess that explicit indexing would be a bit slower than auto-indexing, but it may be faster than the combo of Transpose plus auto-indexing.
-Kevin P.
04-26-2006 01:18 PM
04-26-2006 02:15 PM
04-26-2006 02:49 PM
04-26-2006 02:56 PM
@tlivingston wrote:
Auto indexing is efficient in a for loop. but not in a while loop.
True, but the current problem seem to relate to FOR loops, processing array slices of a 2D arra with fixed size.
Thanks, I should have mentioned that. 🙂
04-26-2006 03:08 PM
04-26-2006 03:12 PM
04-26-2006 03:27 PM