Thanks for the response! Actually I am using a local variable and shift registers. This I use for both versions. I attached the two files and all the necessary sub-VIs.
It is very likely that many of the routines I use are very ineffiecient! However, these are the same for the two verions with a string array and variant attributes. So they might be responsible for the overal lack of performance but not for the difference I guess.
The idea is to store the variable using the command "set(variablename,variablevalue)" and retreive it via "get(variablename)". The boolean tells you if the variable value has changed since the last call.
Thanks for the support, best regards,
All seems to be right in my world. A few things I took liberties with:
1) Made "real" functional global variables out of the two VIs. By this I mean I ditched the local, and deleted the control to let the shift register hold the value. I added a 'clear' command to empty the Shift register in both cases.
2) Missing a couple of VIs: GetVarValue and String to Array, I just guessed what they did (simple search and spreadsheet string to array).
3) Benchmarked by clearing then feeding in 5000 set(x#,#) commands (set(x0,0), set(x1,1)... followed by get(x#) to retrieve all of the values.
Times are in seconds, no getting around n vs lg(n)
FYI, for anyone still following this thread, there is a new data type in LabVIEW 2019 and later called a Map that is a more robust and complete implementation for doing data lookups than the variant attribute technique described in my original nugget post.
See the LabVIEW 2019 Upgrade Notes for more information about Maps.