Skip to content

[dont merge] Revert "Inline a few functions." #103467

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

Closed

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Oct 24, 2022

Reverts #102387

Now that we have LTO for rustc, I want to try if it can make some of the recent "adhoc" #[inline] sprinkling redundant.

This PR had a very nice win and no regressions, so let's see what happens if we revert it with LTO being turned on.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 24, 2022
@rust-highfive
Copy link
Contributor

r? @lcnr

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 24, 2022
@Kobzol
Copy link
Contributor Author

Kobzol commented Oct 24, 2022

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 24, 2022
@bors
Copy link
Collaborator

bors commented Oct 24, 2022

⌛ Trying commit ee995d7 with merge 7ce8c599c552a56995b2e312dc926d58f92f80ee...

@bors
Copy link
Collaborator

bors commented Oct 24, 2022

☀️ Try build successful - checks-actions
Build commit: 7ce8c599c552a56995b2e312dc926d58f92f80ee (7ce8c599c552a56995b2e312dc926d58f92f80ee)

@rust-timer
Copy link
Collaborator

Queued 7ce8c599c552a56995b2e312dc926d58f92f80ee with parent 56f1325, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7ce8c599c552a56995b2e312dc926d58f92f80ee): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.3%, -0.3%] 1
Improvements ✅
(secondary)
-0.5% [-0.6%, -0.5%] 4
All ❌✅ (primary) -0.3% [-0.3%, -0.3%] 1

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.7% [4.6%, 4.8%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% [-2.8%, -2.5%] 2
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 24, 2022
@Kobzol
Copy link
Contributor Author

Kobzol commented Oct 24, 2022

Nevermind the improvements, the previous tt-muncher wins have not turned into regressions, which is a subtle hint that maybe LTO was able to do this. That's good news I guess, although there have been many changes to the compiler in the meantime, so it's not clear that this is the case.

I don't think that this should be merged, but anyway CCing @nnethercote.

@nnethercote
Copy link
Contributor

Given that LTO for rustc is Linux only, we should definitely not land this. But it's an interesting experiment nonetheless!

@Kobzol
Copy link
Contributor Author

Kobzol commented Oct 26, 2022

I agree. Closing.

@Kobzol Kobzol closed this Oct 26, 2022
@Kobzol Kobzol deleted the revert-102387-inline-Token-PartialEq branch October 26, 2022 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants