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

Add ZeroTrie getter function that works on a non-slice lookup key and use it in BlobDataProvider #4249

Closed
sffc opened this issue Nov 2, 2023 · 1 comment · Fixed by #4383
Assignees
Labels
C-zerovec Component: Yoke, ZeroVec, DataBake S-medium Size: Less than a week (larger bug fix or enhancement) T-enhancement Type: Nice-to-have but not required

Comments

@sffc
Copy link
Member

sffc commented Nov 2, 2023

Currently the ZeroTrie getter functions look like

pub fn get<K>(&self, key: K) -> Option<usize> where K: AsRef<[u8]>

However, there are cases where we can't AsRef<[u8]>. For example, a Locale does not AsRef<[u8]>, but it could produce for example an Iterator<Item = u8> or similar.

Implement this and bench the results.

@sffc sffc added T-enhancement Type: Nice-to-have but not required S-medium Size: Less than a week (larger bug fix or enhancement) C-zerovec Component: Yoke, ZeroVec, DataBake labels Nov 2, 2023
@sffc
Copy link
Member Author

sffc commented Nov 28, 2023

The better getter function should also support strip_prefix-like behavior.

Probably implement something similar to the ICU4C trie iterator.

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 S-medium Size: Less than a week (larger bug fix or enhancement) T-enhancement Type: Nice-to-have but not required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant