LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Maps - Process Intensive Operation?

Solved!
Go to solution

All,

 

I'm wondering how performant the unbundle on maps is in regards to a looping structure like a timed while loop.

 

Characteristically, a map of maps is a faux pas - I realized this. It works in this use-case, but am open to suggestions - and is not the question.

 

The real question is, is a map to list structure process-heavy for a per-loop operation? The below code takes a storage structure (map of maps, blue) and parses down to only those keys that must be manipulated during that loop cycle. The reason that I've chosen a map (pink) for the key storage is due to its sorting/searching, but am curious about how the structure manages (as a map does in java), of parsing itself into a list:

Map of MapsMap of Maps

 

Is this method unnecessarily heavy?

 

Thanks so much,

Evan

0 Kudos
Message 1 of 4
(1,262 Views)
Solution
Accepted by topic author ejohnson3

The map is not transformed into a list. The tunnel iterator traverses the map structure. No data copies; is efficient. 

 

Tangent: Why is a map of maps a faux pas? I use those regularly. 

 

Message 2 of 4
(1,220 Views)

I've heard this from a professor, maybe it was due to use-case and not on the structure itself.

 

Thanks for the quick response!!

0 Kudos
Message 3 of 4
(1,207 Views)

If you do transform a map to a set, that’s expensive, but LabVIEW doesn’t have to in order to iterate. 

0 Kudos
Message 4 of 4
(1,185 Views)