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 and Data.Set from the containers library where the key is specialized to Word8. Internally, this uses a 256-bit bitmask for the presence of keys and a SmallArray 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 technically O(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

Components