[Dan Stromberg] > Does anyone have a python implementation (or python C/C+ extension) that > would allow me to perform set operations (union, intersection, difference, > number of elements, &c) over very large collections of integers? > > Some of the sets may have over 10**11 (probably less than 10**13 > though) integers in them, but there will tend to be runs of integers being > included or not included, so there might be 10**5 consecutive integers > included, then 10**4 that are not included, and then another 10**6 that > are.
This may help: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/230113 Raymond Hettinger -- http://mail.python.org/mailman/listinfo/python-list