Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ZeroVec entries to be a non-whole number of bytes #1068

Open
sffc opened this issue Sep 18, 2021 · 0 comments
Open

Allow ZeroVec entries to be a non-whole number of bytes #1068

sffc opened this issue Sep 18, 2021 · 0 comments
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

Comments

@sffc
Copy link
Member

sffc commented Sep 18, 2021

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.

@sffc sffc added T-enhancement Type: Nice-to-have but not required good first issue Good for newcomers C-data-infra Component: provider, datagen, fallback, adapters S-small Size: One afternoon (small bug fix or enhancement) labels Sep 18, 2021
@sffc sffc added backlog help wanted Issue needs an assignee and removed good first issue Good for newcomers labels Sep 30, 2021
@sffc sffc added S-epic Size: Major project (create smaller child issues) and removed v1 S-small Size: One afternoon (small bug fix or enhancement) labels Apr 1, 2022
@sffc sffc added this to the Backlog milestone Dec 22, 2022
@sffc sffc added C-zerovec Component: Yoke, ZeroVec, DataBake and removed backlog C-data-infra Component: provider, datagen, fallback, adapters labels Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant