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

Key and Value types for Store #8

Open
mappum opened this issue Nov 10, 2019 · 0 comments
Open

Key and Value types for Store #8

mappum opened this issue Nov 10, 2019 · 0 comments

Comments

@mappum
Copy link
Contributor

mappum commented Nov 10, 2019

The current Store trait uses &[u8] and Vec<u8> for keys and values in get/put/delete.

There are a few optimizations we can make based on ways we use these keys:

  • We often prefix keys, but we should be able to cheaply concatenate similar to chaining iterators, rather than allocating/coping each time.
  • Keys could store cached hashes (see Hash caching and shared set hash functions #7) or Bloom filter indices (see Bloom filter sets #9) to speed up set operations.
  • We can probably make both Key and Value more flexible in terms of supporting both references and owned data (to reduce the amount of copying needed).
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

1 participant