Documentation
¶
Overview ¶
Package bitset provides a bit-packed set implementation for efficient null masks.
Package bitset provides a space-efficient bit array implementation.
BitSet uses 1 bit per value (packed into uint64 words) rather than 1 byte, providing an 8x memory savings compared to []bool.
Primary use case: null masks in Series where each bit indicates if a value is null. Target performance: <10ns per Set/Test operation.
Index ¶
- type BitSet
- func (bs *BitSet) All() bool
- func (bs *BitSet) Any() bool
- func (bs *BitSet) Clear(i int)
- func (bs *BitSet) ClearAll()
- func (bs *BitSet) Clone() *BitSet
- func (bs *BitSet) Count() int
- func (bs *BitSet) Len() int
- func (bs *BitSet) None() bool
- func (bs *BitSet) Set(i int)
- func (bs *BitSet) SetAll()
- func (bs *BitSet) Slice(start, end int) *BitSet
- func (bs *BitSet) Test(i int) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitSet ¶
type BitSet struct {
// contains filtered or unexported fields
}
BitSet is a bit-packed array using uint64 words. Each bit represents a boolean value (1 = set/true, 0 = clear/false). Used primarily for null masks in Series where 1 = null.
func New ¶
New creates a new BitSet with the specified length. All bits are initialized to 0 (cleared).