github.com/yourbasic/bit
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.
proxy.golang.org
v0.0.0-20180313074424-45a4409f4082
almost 8 years ago
1
18
16
Links
| Registry | proxy.golang.org |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:golang/github.com/yourbasic/bit
spec |
| License | BSD-2-Clause |
| Namespace | github.com/yourbasic |
| First Release | almost 8 years ago |
| Last Synced | 21 days ago |
Repository
| Stars | 141 on GitHub |
| Forks | 25 on GitHub |