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

Use ensure when the result of the query is not needed beyond its Resultness #120771

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Feb 8, 2024

while I would like to just remove the tcx methods for ensure-only queries, that is hard to do without another query annotation or by turning the define_callbacks macro into a proc macro to get more control

should fix perf regression of #120558

@rustbot
Copy link
Collaborator

rustbot commented Feb 8, 2024

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or
reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Feb 8, 2024
@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 8, 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 Feb 8, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 8, 2024
…l, r=<try>

Use `ensure` when the result of the query is not needed beyond its `Result`ness

while I would like to just remove the `tcx` methods for ensure-only queries, that is hard to do without another query annotation or by turning the `define_callbacks` macro into a proc macro to get more control

should fix perf regression of rust-lang#120558
@bors
Copy link
Contributor

bors commented Feb 8, 2024

⌛ Trying commit aa6f45e with merge 07e49d4...

@bors
Copy link
Contributor

bors commented Feb 8, 2024

☀️ Try build successful - checks-actions
Build commit: 07e49d4 (07e49d48504ebcd5c84528313a1730dc7cbc7502)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (07e49d4): 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 a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.7% [-0.7%, -0.7%] 3
Improvements ✅
(secondary)
-0.4% [-0.6%, -0.3%] 14
All ❌✅ (primary) -0.7% [-0.7%, -0.7%] 3

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.

mean range count
Regressions ❌
(primary)
3.1% [2.0%, 4.2%] 2
Regressions ❌
(secondary)
2.9% [2.9%, 2.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.1% [2.0%, 4.2%] 2

Cycles

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

Binary size

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

Bootstrap: 662.662s -> 664.652s (0.30%)
Artifact size: 308.26 MiB -> 308.24 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 8, 2024
@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 8, 2024

@bors r=davidtwco

doesn't fix the regression, but is an improvement on its own.

@bors
Copy link
Contributor

bors commented Feb 8, 2024

📌 Commit aa6f45e has been approved by davidtwco

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 Feb 8, 2024
@bors
Copy link
Contributor

bors commented Feb 10, 2024

⌛ Testing commit aa6f45e with merge 232919c...

@bors
Copy link
Contributor

bors commented Feb 10, 2024

☀️ Test successful - checks-actions
Approved by: davidtwco
Pushing 232919c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 10, 2024
@bors bors merged commit 232919c into rust-lang:master Feb 10, 2024
12 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Feb 10, 2024
@oli-obk oli-obk deleted the useless_non_ensure_query_call branch February 10, 2024 11:57
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (232919c): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

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.

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

Cycles

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

Binary size

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

Bootstrap: 666.007s -> 666.159s (0.02%)
Artifact size: 308.04 MiB -> 308.05 MiB (0.01%)

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. 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