Skip to main content

C-based extension to implement integer bit-sets

Project description

Defines an intbitset data object to hold unordered sets of unsigned integers with ultra fast set operations, implemented via bit vectors and Python C extension to optimize speed and memory usage.

Emulates the Python built-in set class interface with some additional specific methods such as its own fast dump and load marshalling functions. Uses real bits to optimize memory usage, so may have issues with endianness if you transport serialized bitsets between various machine architectures.

Please note that no bigger than __maxelem__ elements can be added to an intbitset and, if CFG_INTBITSET_ENABLE_SANITY_CHECKS is disabled, you will receive unpredictable results.

>>> x = intbitset([1,2,3])
>>> y = intbitset([3,4,5])
>>> print x & y
>>> print x | &
intbitset([1, 2, 3, 4, 5])

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for intbitset, version 1.4
Filename, size File type Python version Upload date Hashes
Filename, size intbitset-1.4.tar.gz (108.2 kB) File type Source Python version None Upload date Hashes View
Filename, size (112.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page