orga icon indicating copy to clipboard operation
orga copied to clipboard

Key and Value types for Store

Open mappum opened this issue 5 years ago • 0 comments

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 #7) or Bloom filter indices (see #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).

mappum avatar Nov 10 '19 03:11 mappum