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
intbitset([3])
>>> print x | y
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.

Source Distributions

intbitset-1.4a.zip (112.2 kB view details)

Uploaded Source

intbitset-1.4a.tar.gz (108.2 kB view details)

Uploaded Source

File details

Details for the file intbitset-1.4a.zip.

File metadata

  • Download URL: intbitset-1.4a.zip
  • Upload date:
  • Size: 112.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for intbitset-1.4a.zip
Algorithm Hash digest
SHA256 3f85c9a7aeb0f4fb7babfb34d9f2d8b7ca5d65cf8dade8fd4e9ada4ff9d5c737
MD5 3e02c3850d4450b9acd831af60be3fff
BLAKE2b-256 862e23b9b492c2047ed9abd69e242ca3a0a201957fb736ee72a96aba7d980ea8

See more details on using hashes here.

File details

Details for the file intbitset-1.4a.tar.gz.

File metadata

  • Download URL: intbitset-1.4a.tar.gz
  • Upload date:
  • Size: 108.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for intbitset-1.4a.tar.gz
Algorithm Hash digest
SHA256 e5b71ced0ca06f12872342ad34487ae721e4d5436241cc9aa79cb7a6a2c80e16
MD5 ff72b9a54c03a367611479fae1da3e10
BLAKE2b-256 7995ecf83c271bbe171f15bca711204c5f0d8ee244e00365dd36fa36341b7da3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page