Skip to content

Question: Double-Ended IndexMap #350

@emkw

Description

@emkw

Question to someone familiar with the codebase:

I am probably oversimplyfing things, but I imagine currently the IndexMap is backed by "something like a Vec", would changing it to "something like a VecDeque" allow popping first key-value pairs in O(1) time, same as popping last key-value pairs?

Basically my use case is that I could use a FIFO with random access by keys; as I understand currently IndexMap would allow for LIFO in O(1) time and FIFO in O(n) time.

How difficult do you think would be such modification of existing codebase?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions