Allow ZeroVec entries to be a non-whole number of bytes #1068
Labels
C-zerovec
Component: Yoke, ZeroVec, DataBake
help wanted
Issue needs an assignee
S-epic
Size: Major project (create smaller child issues)
T-enhancement
Type: Nice-to-have but not required
Milestone
Various situations require only 4 bits or 12 bits for entries, but ZeroVec currently requires rounding up to the nearest number of bytes. This can have a large impact on memory usage.
For example, take Script. It probably requires only 12 bits.
To allow for such a type, we could make "ScriptPairULE", which is 3 bytes to represent 2 scripts. Then, we just need to make the .get() and .iter() functions perform the correct random accessing.
The text was updated successfully, but these errors were encountered: