-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[DO NOT MERGE] Measure cost of per function section #77051
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
I was experimenting with using per function sections instead of a single `.text` section in cg_clif to see if it reduced binary size. It brings the size down for the test I used from 26MB to 15MB like the output of cg_llvm in debug mode. When I measured the linker time the result was a lot less positive: ~0.4s turned into ~0.7s. That is a 75% slowdown. It would be interesting to know what the cost is for cg_llvm over the full rustc-perf benchmark suite.
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit 71f63d0 with merge 8a4aabcca5f2e9187df7a96c20f8cba616c0be39... |
☀️ Try build successful - checks-actions, checks-azure |
Queued 8a4aabcca5f2e9187df7a96c20f8cba616c0be39 with parent c113030, future comparison URL. |
Finished benchmarking try commit (8a4aabcca5f2e9187df7a96c20f8cba616c0be39): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
OMG that's incredible! |
Big wins of up to 20%. No regressions at all. |
(sorry, GitHub on mobile is awful) |
Function sections are supposed to reduce the size of final binary since we pass |
That the final size got smaller when using per function sections as it is supposed to. I may have worded it a bit confusingly. |
(Changed this to a draft to make the "[DO NOT MERGE]" part even more clear) |
It would also be nice to check the perf impact of not passing |
I have replaced disabling |
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit c566b5dcaf8e29cf8c6ca16164cd032ab9a1be4c with merge 62ede63726a44d18001f60e2a93b55965b9ca2d8... |
☀️ Try build successful - checks-actions, checks-azure |
Queued 62ede63726a44d18001f60e2a93b55965b9ca2d8 with parent 511ed9f, future comparison URL. |
Finished benchmarking try commit (62ede63726a44d18001f60e2a93b55965b9ca2d8): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit 6d1124e with merge 7aa1ca89673ff9147df9467391cd50b2eb496016... |
☀️ Try build successful - checks-actions, checks-azure |
Queued 7aa1ca89673ff9147df9467391cd50b2eb496016 with parent d92d28e, future comparison URL. |
Finished benchmarking try commit (7aa1ca89673ff9147df9467391cd50b2eb496016): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
As of #78414 you can use |
I was experimenting with using per function sections instead of a single
.text
section in cg_clif to see if it reduced binary size. It brings the size down for the test I used from 26MB to 15MB like the output of cg_llvm in debug mode. When I measured the linker time the result was a lot less positive: ~0.4s turned into ~0.7s. That is a 75% slowdown. It would be interesting to know what the cost is for cg_llvm over the full rustc-perf benchmark suite.Can someone start a perf run for me?