Skip to content
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

Skip Lazy for some metadata tables #95867

Merged
merged 8 commits into from
Apr 12, 2022
Merged

Skip Lazy for some metadata tables #95867

merged 8 commits into from
Apr 12, 2022

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Apr 9, 2022

Some metadata tables encode their entries indirectly, through the Lazy construct. This is useful when dealing with variable length encoding, but incurs the extra cost of one u32.

Meanwhile, some fields can be encoded in a single u8, or can use a short fixed-length encoding. This PR proposes to do so, and avoid the overhead.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 9, 2022
@cjgillot
Copy link
Contributor Author

cjgillot commented Apr 9, 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 Apr 9, 2022
@bors
Copy link
Contributor

bors commented Apr 9, 2022

⌛ Trying commit 39fd6f674c492d209f83a490ebaf10cbf0b150a8 with merge 15d46b8154c4bad80167c6cbf595c14757a5d34d...

@bors
Copy link
Contributor

bors commented Apr 9, 2022

💔 Test failed - checks-actions

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 9, 2022
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@cjgillot
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

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

@bors
Copy link
Contributor

bors commented Apr 10, 2022

⌛ Trying commit b4cf2cd with merge 20b8a895ef404521ba7fac00e8f75e13eb407af4...

@bors
Copy link
Contributor

bors commented Apr 10, 2022

☀️ Try build successful - checks-actions
Build commit: 20b8a895ef404521ba7fac00e8f75e13eb407af4 (20b8a895ef404521ba7fac00e8f75e13eb407af4)

@rust-timer
Copy link
Collaborator

Queued 20b8a895ef404521ba7fac00e8f75e13eb407af4 with parent 32c2630, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (20b8a895ef404521ba7fac00e8f75e13eb407af4): comparison url.

Summary:

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 🎉 relevant improvements found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 0 0 0 9 0
mean2 N/A N/A N/A -0.3% N/A
max N/A N/A N/A -0.4% N/A

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

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

Footnotes

  1. number of relevant changes

  2. the arithmetic mean of the percent change

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Apr 10, 2022
@cjgillot
Copy link
Contributor Author

Perf reports no change in instruction count, and a ~1.5 % decrease in max-rss.

r? rust-lang/compiler

@oli-obk oli-obk marked this pull request as ready for review April 11, 2022 07:25
@cjgillot cjgillot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 11, 2022
@oli-obk
Copy link
Contributor

oli-obk commented Apr 12, 2022

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Apr 12, 2022

📌 Commit b4cf2cd has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 12, 2022
@bors
Copy link
Contributor

bors commented Apr 12, 2022

⌛ Testing commit b4cf2cd with merge de56c29...

@bors
Copy link
Contributor

bors commented Apr 12, 2022

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing de56c29 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 12, 2022
@bors bors merged commit de56c29 into rust-lang:master Apr 12, 2022
@rustbot rustbot added this to the 1.62.0 milestone Apr 12, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (de56c29): comparison url.

Summary:

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: mixed results
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 0 5 0 1 0
mean2 N/A 0.4% N/A -0.7% N/A
max N/A 0.5% N/A -0.7% N/A

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression

Footnotes

  1. number of relevant changes

  2. the arithmetic mean of the percent change

@rustbot rustbot added the perf-regression Performance regression. label Apr 12, 2022
@cjgillot cjgillot deleted the fixed-size branch April 13, 2022 16:31
@cjgillot
Copy link
Contributor Author

The PR provides a consistent reduction in max-rss ~1.5-2%. The instruction count result is less than 1% and mixed.
@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

6 participants