05-11-2021 05:09 PM - edited 05-11-2021 05:13 PM
Attached is a quick example I threw together using a Map. It's all based on random 5-character strings. I have a fixed Map containing 500k of them and then an array containing another 50k of them.
50k lookups in a 500k Map is taking about 65 millisec with For Loop parallelism *disabled*. When I allow 4 parallel loops it's down to about 35-40 millisec.
Attached is the simple example code, but you'll need LabVIEW 2019 or later for Maps.
LabVIEW 2020 SP1 introduced an NI-supplied binary search of a pre-sorted 1D array.
In prior versions, we resorted to Variant attributes or coding our own binary search.
-Kevin P
05-11-2021 06:54 PM
Works Great thank you!
05-11-2021 06:56 PM
This works and is about the same speed as the Search sorted vim, new in 2020. I opted for the VIM just because it's small and clean. Thank you!