Herbert37 has asked for the wisdom of the Perl Monks concerning the following question:
Okay, part deux. Hash look-ups are the way to solve this problem. I withdraw the question.
Okay, sorting both files appears to be the only answer I can find... Is there another?
I have two large (10Mg plus) files of words, one file contains essentially just words, the other words and their pronunciations.
I want to discover and store how many of the words in the file without pronunciations have their pronunciations in the other file.
The first way, and only way, I can think of to do this is to check each word in the file without pronunciations against every word in the pronunciation file, but that will result in 10M X 10M comparisons and be very costly in time.
Is there another way? I believe I have seen one, but cannot remember it.
Thank you.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Comparing large files
by BrowserUk (Patriarch) on Feb 11, 2014 at 19:30 UTC | |
|
Re: Comparing large files
by LanX (Saint) on Feb 11, 2014 at 19:30 UTC | |
|
Re: Comparing large files
by wjw (Priest) on Feb 11, 2014 at 19:41 UTC | |
by Herbert37 (Novice) on Feb 12, 2014 at 20:44 UTC | |
by erix (Prior) on Feb 12, 2014 at 20:54 UTC | |
by wjw (Priest) on Feb 13, 2014 at 09:33 UTC | |
|
Re: Comparing large files
by Laurent_R (Canon) on Feb 11, 2014 at 23:32 UTC | |
|
Re: Comparing large files
by Herbert37 (Novice) on Feb 12, 2014 at 05:15 UTC |