Skip to content

length(::ImmutableDict) is not O(1) #59903

@adienes

Description

@adienes

length(t::ImmutableDict) = count(Returns(true), t)

should ImmutableDict store its length as a field on construction? another resolution might be to delete the length method and add an IteratorSize() = SizeUnknown so that iteration doesn't try to call length.

or, just do nothing and accept a slow length call

Metadata

Metadata

Assignees

No one assigned

    Labels

    collectionsData structures holding multiple items, e.g. setsperformanceMust go faster

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions