Skip to content

Code bloat from RawVec::grow_amortized #78471

Closed
@glandium

Description

@glandium

The change in #72227 made non-PGO builds of Firefox's libxul.so's .text section grow by close to 1MB. libxul.so has a ~89MB section, which makes it a > 1% size increase in a library where about only 16% of the code is rust, which makes it a > 7% (!) increase in size. This comes from the fact that essentially all uses of Vec::push inline this all for some reason, and it's used all across the place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-collectionsArea: `std::collections`I-heavyIssue: Problems and improvements with respect to binary size of generated code.P-mediumMedium priorityT-libsRelevant to the library team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions