Skip to content

HashSet iteration on drop not elided for Copy elements #31711

Closed
@bluss

Description

@bluss

If a HashSet has Copy elements, it doesn't need to visit all elements on drop. The iteration in RawTable's drop still is computed even if the elements have no destructors, which leads to O(n) average complexity even then.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-collectionsArea: `std::collections`I-slowIssue: Problems and improvements with respect to performance of generated code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions