Nice. Using the object's key as a set was my first thought.mikeyww wrote: ↑04 Dec 2022, 08:16Is yours doing a union? I think it's supposed to be removing the duplicates.
This revision does seem to get the elapsed time down to approximately zero seconds.
Code: Select all
SetBatchLines -1 dir = %A_ScriptDir% out := FileOpen(dir "\result.txt", "w `n") line := {} start := A_TickCount Loop, Read, %dir%\LISTA.txt line[A_LoopReadLine] := True Loop, Read, %dir%\LISTB.txt (!line.HasKey(A_LoopReadLine)) && out.WriteLine(A_LoopReadLine) out := "" MsgBox, 64, Elapsed time, % A_TickCount - start " ms"
image221204-0837-001.png
remove lines present in both long sorted lists
Re: remove lines present in both long sorted lists
Re: remove lines present in both long sorted lists
Good. Smile_'s idea. Generalized: viewtopic.php?p=494531#p494531