github.com/yourbasic/bit (go): Package bit provides a bit array implementation.  A bit set, or bit array, is an efficient set data structure that consists of an array of 64-bit words. Because it uses bit-level parallelism, limits memory access, and efficiently uses the data cache, a bit set often outperforms other data structures.  The Basics example shows how to create, combine, compare and print bit sets.  Primes contains a short and simple, but still efficient, implementation of a prime number sieve.  Union is a more advanced example demonstrating how to build an efficient variadic Union function using the SetOr method.  Create, combine, compare and print bit sets.   Create the set of all primes less than n in O(n log log n) time. Try the code with n equal to a few hundred millions and be pleasantly surprised.   Implement an efficient variadic Union function using SetOr.
Keywords: bit-array|bit-twiddling|bitset|data-structures|go