-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking Issue for optimize_for_size standard library feature #125612
Copy link
Copy link
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCI-heavyIssue: Problems and improvements with respect to binary size of generated code.Issue: Problems and improvements with respect to binary size of generated code.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCI-heavyIssue: Problems and improvements with respect to binary size of generated code.Issue: Problems and improvements with respect to binary size of generated code.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
#125011 has added a
optimize_for_sizefeature to the standard library, which is designed for special casing some algorithms incore/alloc/stdto provide an implementation that tries to minimize its effect on binary size.To use this feature, the standard library has to be compiled using
-Zbuild-std:$ cargo +nightly build -Z build-std -Z build-std-features="optimize_for_size" ...Optimizations that leverage this flag:
optimize_for_size#125609ptr::rotatesmaller when usingoptimize_for_size#125720optimize_for_sizevariants for stable and unstable sort as well as select_nth_unstable #129587