Skip to content

Performance: Expand use of presizing in sets to include more sized iterables #156548

Description

@brittanyrey

set() and set.update() already presize once upfront when called on other sets or dicts, but other iterables are sized dynamically. For iterables where we know their size, expand the use of presizing to reduce overhead.

PR is already prepared.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagetype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions