Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

go-bitset

A bit string is literally a fixed-length sequence of bits (0s and 1s) used as a compact way to represent a set of integers.

For example, the bitstring 1010 represents the set {1, 3}. The size of the string is 4 bits, and can represent a set of 4 integers.

Bit strings become efficient to use when the number of integers is large. ie. when we have a set of 1000 integers, we can represent it with:

  • naively: 1000 * uint32 = 4000 bytes
  • with a bitstring: 1000 bits = 125 bytes

About

A compact integer set using bitstrings

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages