07-28-2020 12:03 PM
@billko wrote:
I was thinking that the memory would just be "reconsidered" as is the case with a reversed string, but you're saying that manipulating a multi-dimensional array would be more complicated? In other words, LV would actually have to re-create the data, not "reconsider" it?
Yes, often a transpose can be done without touching the data (just flag it as transposed), depending on what comes next. (e.g. for index array, just swap the indices, for an autoindexing FOR loop, index on rows instead of columns, etc).
Since arrays need to be contiguous there is significant reshuffling in memory when appending rows, most likely requiring a brand new allocation for the entire output array anyway. I have no idea what it will do with your three transpose operations... How many allocation dots do you see?
07-28-2020 02:29 PM
Some more information:
The rows are fixed size 6 and the number of colums that are added are also always the same but can be between 10 and 10000.
But the add will run in a loop and executed very often which means it should be fast.
The reason doing this is to collect measuremt data over 6 channels and display them on a xy-graph. Where x is only 0..arraysize. Each time the new data is added to the array i show the array on the graph.
07-28-2020 02:43 PM - edited 07-28-2020 02:44 PM
If this is xy data, consider contracting x and y data into a single complex datatype. XY graphs understand complex arrays directly and will graph IM vs RE.
Now all you have is a 1D complex array that you grow over time.
07-28-2020 03:08 PM
Its a 2D array as there a 6 channels that each get new y-data in the loops.
The x data is calculated afterwards.