in reply to Are two lines in the text file equal

Update: He did say Algorithm, didn't he?

Assuming not all-in-memory, and for certain values of "fastest"...

Sort each log file, removing duplicates (perhaps into new files).

Merge sort the files together, (adding some tag to each line indicating the original file and line, if desired).

Scan the merge-sorted file, checking for identical "lines" (of original data).

If duplicate lines within a file are interesting, handle that in the merge with a tag.

-QM
--
Quantum Mechanics: The dreams stuff is made of

  • Comment on Re: Are two lines in the text file equal