Skip to content

Implement Cursor API for BTreeMap #26

Description

@declanvk

See rust-lang/libs-team#141 for design of API and links to implementing CR


This feature may be a bit difficult because I believe that the BTreeMap implementation maintains a linked-list among leaf nodes so that traversing among those nodes is easy.

Options:

  1. We also start maintaining a leaf node linked list, this would likely speed up and simplify iterators, but at the cost of increased memory usage in the tree. Currently our iterators maintain a stack of previous nodes, we could save some memory usage here
  2. We could implement the cursor API using the stack based traversal method, but moving to the next node would be slightly slower.e

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions