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

Add fast-path when computing the default visibility #131686

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented Oct 14, 2024

This PR adds (or more correctly re-adds the) fast-path when computing the default visibility, by taking advantage of the fact that the "interposable" requested visibility always return the "default" codegen visibility.

Should address the small regression observed in #131111 (comment).

r? @lqd

@rustbot rustbot added 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. labels Oct 14, 2024
@lqd
Copy link
Member

lqd commented Oct 14, 2024

As cachegrind showed the small regressions in #130005 to be purely in the query system, I'm fully confident that the new unconditional query call to the expensive query was the source.

So, r=me with green perf and/or a cachegrind comparison between this and #130005 (or its parent commit). I expect the "PROGRAM TOTALS" line on a cg report for this PR to be the same as before the change was made.

@Urgau
Copy link
Member Author

Urgau commented Oct 14, 2024

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 14, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 14, 2024
Add fast-path when computing the default visibility

This PR adds (or more correctly re-adds the) fast-path when computing the default visibility, by taking advantage of the fact that the "interposable" requested visibility always return the "default" codegen visibility.

Should address the small regression observed in rust-lang#131111 (comment).

r? `@lqd`
@bors
Copy link
Contributor

bors commented Oct 14, 2024

⌛ Trying commit 67b85e2 with merge 701880a...

@bors
Copy link
Contributor

bors commented Oct 14, 2024

☀️ Try build successful - checks-actions
Build commit: 701880a (701880a6fab37ed2f0c178997183a43fe182dac0)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (701880a): 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-perf -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-0.2%, -0.2%] 4

Max RSS (memory usage)

Results (primary 1.4%, secondary 2.0%)

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.

mean range count
Regressions ❌
(primary)
1.4% [1.2%, 1.6%] 3
Regressions ❌
(secondary)
2.0% [1.5%, 2.9%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.4% [1.2%, 1.6%] 3

Cycles

Results (secondary -2.4%)

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.4% [-2.5%, -2.3%] 2
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 782.104s -> 782.36s (0.03%)
Artifact size: 332.57 MiB -> 332.70 MiB (0.04%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 14, 2024
@lqd
Copy link
Member

lqd commented Oct 14, 2024

Plan-3

@bors
Copy link
Contributor

bors commented Oct 14, 2024

📌 Commit 67b85e2 has been approved by lqd

It is now in the queue for this repository.

@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 Oct 14, 2024
@lqd
Copy link
Member

lqd commented Oct 16, 2024

Actually, we have the results, and the regressions are mild enough that it's fine to roll this PR up. @bors rollup=maybe

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 16, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#130822 (Add `from_ref` and `from_mut` constructors to `core::ptr::NonNull`.)
 - rust-lang#131381 (Implement edition 2024 match ergonomics restrictions)
 - rust-lang#131594 (rustdoc: Rename "object safe" to "dyn compatible")
 - rust-lang#131686 (Add fast-path when computing the default visibility)
 - rust-lang#131699 (Try to improve error messages involving aliases in the solver)
 - rust-lang#131757 (Ignore lint-non-snake-case-crate#proc_macro_ on targets without unwind)
 - rust-lang#131783 (Fix explicit_iter_loop in rustc_serialize)
 - rust-lang#131788 (Fix mismatched quotation mark)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2560453 into rust-lang:master Oct 16, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Oct 16, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 16, 2024
Rollup merge of rust-lang#131686 - Urgau:fast-path-vis, r=lqd

Add fast-path when computing the default visibility

This PR adds (or more correctly re-adds the) fast-path when computing the default visibility, by taking advantage of the fact that the "interposable" requested visibility always return the "default" codegen visibility.

Should address the small regression observed in rust-lang#131111 (comment).

r? `@lqd`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants