06-03-2021 10:08 AM
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 Maps
Is this method unnecessarily heavy?
Thanks so much,
Evan
Solved! Go to Solution.
06-03-2021 12:05 PM - edited 06-03-2021 12:09 PM
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.
06-03-2021 12:15 PM
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!!
06-03-2021 01:27 PM
If you do transform a map to a set, that’s expensive, but LabVIEW doesn’t have to in order to iterate.