Bit vectors without compromises
summary
Implements a compact bit-vector type with full Vector and MVector instances, thread-safe writes via atomic OR/AND/XOR and word-level ops so random updates stay efficient; blockwise invert and zip use 64-bit words (typical 64x speedup) and fall back to libgmp routines for up to 1000x on some workloads. Includes ~30 property tests for edge cases (offsets, slices, copy/grow) and conversions from ByteString, popcount, and boolean-polynomial helpers.
AI-written summary · about
chapters (19)
- 0:00Introduction and speaker intro
- 0:46What are bit vectors
- 2:34Problems with vector of Bool
- 4:17Array package limitations
- 5:22Containers for sparse vectors
- 7:07Integer-based bit vectors
- 8:56Desired bit vector properties
- 10:01Bitrack data structure design
- 11:28Mutable bit vector writing
- 12:56Concurrency issues and solutions
- 16:32Atomic operations for thread safety
- 18:01Modify function and inversion
- 20:31Block-wise functions and edge cases
- 21:34Property testing for correctness
- 22:37Bits interface and block-wise map
- 24:21GMP library for performance
- 25:46Block-wise zipping and functions
- 27:33Additional features in bitvec
- 28:15Summary and performance
