-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Reduce the code size of the standard library by about 5%-6% #10263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…r to reduce the stdlib code size This shaves off 3.2% of the stdlib’s code size.
This should reduce the code size of the stdlib by 1.5%.
…e size Move the error reporting slow-path into a separate function, which is not inlined or specialized. This reduced the stdlib code size by almost 1%.
@swift-ci please test |
@aschwaighofer Could you please review this PR? |
LGTM |
Build failed |
@swift-ci please test |
Build failed |
Nice! |
@swift-ci please test |
@swift-ci please test osx |
Build failed |
Build failed |
@swift-ci please smoke test |
@swift-ci please smoke test Linux |
@swift-ci please test linux |
@swift-ci please test OS X |
@swift-ci please smoke test OS X |
Reduce the code size of the standard library by about 5%-6% by adding annotations preventing inlining and/or generic specialization in a couple of places. These places were identified by means of the cmpcodesize utility.
• Explanation: Reduce the code size of the standard library dylib.
• Scope of Issue: Inlining and specialization of some generic functions were causing significant code increase without providing any performance improvements. This PR addresses this issue.
• Origination: N/A
• Risk: Very low. This patch is cherry-picked from the master, where these changes have been landed a week ago and have not caused any issues or performance regressions. The only effect of this PR is the reduced code size of the stdlib.
rdar://problem/32776747