in reply to nested loops to compare 2 files is only looping a limited number of times.
If your second file is not too big (compared to memory available) I would suggest to read the second file into a hash before the first loop and then loop through file1 and look for matches. You only need one loop then and not the two nested ones.
cheers
si_lence
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: nested loops to compare 2 files is only looping a limited number of times.
by ack (Deacon) on Jun 23, 2009 at 15:39 UTC |