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

Accept any iterator type as trie leaves #2

Open
dennis-tra opened this issue Jun 1, 2022 · 0 comments
Open

Accept any iterator type as trie leaves #2

dennis-tra opened this issue Jun 1, 2022 · 0 comments
Assignees

Comments

@dennis-tra
Copy link
Contributor

I could imagine that the ergonomics of the API (at least in my use case :D) would be improved if one could just add a byte type instead of a string of bits as leave nodes. Internally, you could use a library like https://pypi.org/project/bitarray/ to transform the bytes to a bitarray to build the prefix trie. The library seems to have C-bindings which indicates (not guarantees) performance benefits compared to the string conversion of bytes to bitstrings. Maybe the add function signature could accept anything that's a python iterator instead of restricting it to strings?

@dennis-tra dennis-tra changed the title API ergonomics Accept any iterator type as trie leaves Jun 1, 2022
@guillaumemichel guillaumemichel self-assigned this Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants