Instead of iterating thru subscripts of an array when comparing/matching data just to see if something exists or not
concatenate data into a large string
For AssyLoop=1 to DataItems
DataString=DataString+Data$+","
Next
Now you can use the Instr() function to determine wether or not the item exists.
How well this works depends on how much data there is, which of course determines the length of the string. Really large strings take longer to process so sometimes you have to break them up into smaller chunks.
It's also possible to match that data to... say, a file position by creating a numerical stripe array and prepopulating the array with relevant positional data. Then when instr() returns a match at whatever position in the assembled string the same position in the stripe array will contain the filing position - so most of the subscripts in the stripe are not used - only the ones at which a match could occur, but despite that inneficiency and being a pain to set up the speed of operation is very much faster than the iterative technique.
It should go without saying that you don't assemble the string for each and every search. Usually these things remain in memory once assembled - so they also need to be maintained if data changes.
concatenate data into a large string
For AssyLoop=1 to DataItems
DataString=DataString+Data$+","
Next
Now you can use the Instr() function to determine wether or not the item exists.
How well this works depends on how much data there is, which of course determines the length of the string. Really large strings take longer to process so sometimes you have to break them up into smaller chunks.
It's also possible to match that data to... say, a file position by creating a numerical stripe array and prepopulating the array with relevant positional data. Then when instr() returns a match at whatever position in the assembled string the same position in the stripe array will contain the filing position - so most of the subscripts in the stripe are not used - only the ones at which a match could occur, but despite that inneficiency and being a pain to set up the speed of operation is very much faster than the iterative technique.
It should go without saying that you don't assemble the string for each and every search. Usually these things remain in memory once assembled - so they also need to be maintained if data changes.