Your question is short on many important details, but I'm assuming that you are talking about files consisting of name-value pairs in some format, and that a given name appears at most once in each file.
This lends itself to the classic sort-merge approach:
- Sort all files based on the names.
- Pick 2 files to be compared:
- Read the name/value pairs from the 2 files in parallel:
- when names are equal, compare the corresponding values, then skip both pairs
- when the names are not equal, skip the pair that has the smaller name, and read the next one from that file.
- Stop when you reach the end of either file.
Reference: http://en.wikipedia.org/wiki/Mainframe_sort_merge
Note: If you have of the order of a few million records, you should be able to do the sorting and merging in memory ... on a current generation home PC. If you have billions of records, you will need to use a sort algorithm that splits each (large) input file into subfiles, sorts each subfile, and then merges the result.