I have two 3GB text files, each file has around 80 million lines. And they share 99.9% identical lines (file A has 60,000 unique lines, file B has 80,000 unique lines).
If order matters, try the comm utility. If order doesn't matter, sort file1 file2 | uniq -u.
comm
sort file1 file2 | uniq -u