On Oct 5, 2011, at 3:00 PM, Matthias Rebbe wrote: > Hi, > > i need to compare two very large text files with about 5000 - 7000 lines each > with a lines size of up to 256 chars. > > I need to find out if there are lines missing in either file a or file b. > > What is the best way to do this with good speed?
Hi, Matthias. Here's another contender: <script> repeat for each line tLine in tList1 put empty into tArray1[ tLine ] end repeat repeat for each line tLine in tList2 if tLine is not among the keys of tArray1 then put empty into tArray2[ tLine ] end if delete variable tArray1[ tLine ] end repeat put the keys of tArray1 into tList1ButNotList2 put the keys of tArray2 into tList2ButNotList1 </script> Please do share the results of your speed comparisons. -- Dick _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode