Mar-16-2017, 07:09 PM
I ran the experiment on my machine without issues
Another alternative: https://github.com/Ezibenroc/PyRoaringBitMap
Lists will not be efficient though, and a database seems unnecessary unless you *really* run out of memory (in which case a list doesn't work anyway).
Output:>>> count = 100000000
>>> print "{:,}".format(count)
100,000,000
>>> myset = set(xrange(count))
>>> myset = set(xrange(count * 10))
>>>
If you're concerned, you should try running the experiment as well (though be mindful of the memory, swap, and thrashing issues).Another alternative: https://github.com/Ezibenroc/PyRoaringBitMap
Lists will not be efficient though, and a database seems unnecessary unless you *really* run out of memory (in which case a list doesn't work anyway).