in reply to Re^3: Finding an intersection of two sets, lean and mean
in thread Finding an intersection of two sets, lean and mean
As for the +5M lines thing - that becomes a function of your available RAM. Your string solution will hit the same limit, but at around 20-30M (if 5M is your limit with hashes).
Note, your code to build the hash string will bomb faster than your code to iterate through it because you use foreach instead of while to iterate through the list. This creates a copy of the list you're foreach'ing through whereas while does not.
|
|---|