← All repos

bitset

Go package implementing bitsets

bitsetgo
Browse cluster: RISC-V Toolchain & Math Libraries
496commits
52contributors
2languages

Tech stack & purpose

Bitset is a Go language library that implements bitsets, providing an efficient mapping between non-negative integers and boolean values as an alternative to map[uint] bool. The package offers methods for individual bit operations like setting, clearing, flipping, and testing, as well as set operations including intersection, union, difference, complement, and symmetric difference. It supports serialization to and from byte streams, method chaining, and iteration over set bits, with memory usage of approximately N/8 bytes for N bits. The library is part of the broader Go ecosystem and is used in production by numerous systems across databases, search engines, blockchain platforms, infrastructure tools, and machine learning applications.

Languages

Go
99.4%
Shell
0.6%

Contributors (top 30 of 52)