Skip to content

Efficient SkipList::range().count() #1249

Description

@FiV0

The SkipList implementation is used in SlateDB memtables. In order to do range based estimates it would be nice to know the size of the range (without iterating through it). This together with average key size would allow an approximate size estimation of the range. The algorithm I essentially want to do is also described here: https://github.com/facebook/rocksdb/wiki/Approximate-Size#skiplist-memtable-size-estimation.

I don't know how to best expose the information I want (you likely know better). It could also be something on Entry returned by SkipList::lower_bound and SkipList::upper_bound. Let me know if there is taste for this feature and I could write something more thought through up. Feel free to also close if it's too niche.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions