Skip to content

Merge into parent fragment if its not shared by others #4

Description

@mohitmv

On every write operation, if a fragment is unique() and if it's parent fragment is unique() (i.e. it's not shared by other fragments) then merge the current fragment into parent. There is no overhead in doing that from amortized complexity perspective because that much complexity is already paid on making local changes.

Reference: https://www.reddit.com/r/cpp/comments/m9uwaq/releasing_lazy_map_c_library/grpj3gh?utm_source=share&utm_medium=web2x&context=3

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions