LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

which one is faster array or cluster

I did not found any detailed info about this. I have a lot of subVIs in a main VI and I carry output of these subVIs via arrays. Approximately, one array carries 15 data and approximately again these subVIs have 8-12 outputs (arrays). Which way do I choose to carry these data: arrays or clusters?

Egemen
0 Kudos
Message 1 of 4
(2,454 Views)

What is your concern about speed?

 

You should group your data in whatever way is most logical.  If it is a series of like elements (particularly a series of unknown length), then you should use an array.  If it is a group of data that may consist of different datatypes, then you should use a cluster.

0 Kudos
Message 2 of 4
(2,444 Views)

I don't understand the question. If you already have these subVIs, and they work correctly, there is no need to rearchitect them from scratch. Do you experience performance problems?

 

That said, 8-12 output connectors on a subVI is a bit much, and it would be better to combine them e.g. into clusters, especially if certain data sets are always used together.

 

How much is "15 data". Are you dealing with huge data structures? If it is just an array with 15 scalar elements, don't worry about it. Start worrying once you have many megabytes. 😮

 

If you could show us some actual code examples, we probably could be more helpful. At the moment we don't have any useful information to give more specific advice.

0 Kudos
Message 3 of 4
(2,431 Views)

I just wonder which way is better in transporting data in the code. But I got the answer from you. I do not have data in degree of megabyte.

I just have a text file which I use Read from text file function and carry the data via arrays. Each array (amount of 5) has 31292 scalar numbers (1D array). Other subVIs' outputs along with this arrays means nothing, I guess. Thank you.

Egemen
0 Kudos
Message 4 of 4
(2,414 Views)