Skip to content

<unordered_set>, <unordered_map>: Optimize representation #2721

Open

Description

Currently unordered_ use doubly-linked lists and provide iterators that can be decremented.

It is sufficient to provide forward iterators and use single linked list. This will save some memory and help to address #1036 to some extent. Also it will address DevCom-10035118

From #1036 (comment):

unordered_meow really shouldn't be backed by a doubly-linked list; it is required to be forward but not bidi, so it doesn't need sentinel nodes. We should be able to arrange its representation (including the bucket "map") to avoid allocating memory.

vNext note: Resolving this issue will require breaking binary compatibility. We won't be able to accept pull requests for this issue until the vNext branch is available. See #169 for more information.

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

Metadata

Assignees

No one assigned

    Labels

    performanceMust go fastervNextBreaks binary compatibility

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions