11-13-2006, 09:46 PM
I would at first parse first file and put numbers/lines into a map. Then parse second file and try to find numbers in the map. Finding a value in a map is much faster than using foreach and parsing same lines multiple times.
As a map, can be used Dictionary object from Scripting type library. Next QM version also will have its own string map (already done). Or you can use ARRAY instead. Not so fast, but much faster than foreach because to find a value you don't have to parse lines.
foreach line file1
,parse line
,add number to map
foreach line file2
,parse line
,if(find number in map) ;;much faster than using foreach
,,...
,else
,,...
As a map, can be used Dictionary object from Scripting type library. Next QM version also will have its own string map (already done). Or you can use ARRAY instead. Not so fast, but much faster than foreach because to find a value you don't have to parse lines.
foreach line file1
,parse line
,add number to map
foreach line file2
,parse line
,if(find number in map) ;;much faster than using foreach
,,...
,else
,,...