From: James Dechiaro Date: 2008-05-14T20:29:21+09:00 Subject: Re: array diff Thanks for the tip Robert I will give it a go...as the script has been running for over 14 hours now after finding 13k matches =( Robert Klemme wrote: > You might also want to consider using Set or Hash for more efficient > lookups. The way I would probably do it is this: define a record type > that covers all the relevant information (easily done with Struct). > Then read the file to test against (csv2 I believe) and convert > records to the record type which you then add to the Set / Hash. Then > read the second file line by line, convert it and print it if it is > not contained in the Set / Hash. That way you do not need to keep > both files in memory and the Set / Hash lookups are much faster than > Array based lookups. > > Kind regards > > robert -- Posted via http://www.ruby-forum.com/.