byte-containers
Version 0.1.0.1 revision 0 uploaded by l3c_amartin.
Package meta
- Synopsis
- Sets and maps with 8-bit words for keys
- Description
This library provides variant of
Data.Map
andData.Set
from thecontainers
library where the key is specialized toWord8
. Internally, this uses a 256-bit bitmask for the presence of keys and aSmallArray
of values of keys that were present. For example, the map{2 => Z, 3 => B, 5 => X, 9 => A}
would be repsented in memory as:Bitmask: 0011010001000000... (240 more zero bits) Value Array: Z,B,X,A
This is optimized for reads. Lookup is
O(1)
. Union is technicallyO(1)
but only because the universe of keys is finite. The current implementation always scans through all 256 bits of key space.- Author
- Andrew Martin
- Bug reports
- https://github.com/byteverse/byte-containers/issues
- Category
- Data
- Copyright
- 2020 Andrew Martin
- Homepage
- https://github.com/byteverse/byte-containers
- Maintainer
- amartin@layer3com.com
- Package URL
- n/a
- Stability
- n/a