set1 = set()
set2 = set()
mt = time.time();
i = 0
while i < 400000:
set1.add(random.randint(1000000, 10000000))
set2.add(random.randint(1000000, 10000000))
i = i+1;
print time.time() - mt
set3 = set1.intersection(set2)
print time.time() - mt
1.29275107384
1.31910300255