Skip to content

Merge typeck loop with static/const item eval loop #140854

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

Merged
merged 1 commit into from
May 10, 2025

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented May 9, 2025

r? @ghost

Let's try a small one first. Doing this in general has some bad cache coherence issues because the query caches are laid out in Vec<QueryResult> lists per query where each index refers to a DefId in the same order as we're iterating. Iterating two or more lists at the same time does have cache issues, so I want to poke a bit at it to see if we can't merge just a few of them at a time.

@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 May 9, 2025
@oli-obk
Copy link
Contributor Author

oli-obk commented May 9, 2025

@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 May 9, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request May 9, 2025
Merge typeck loop with static/const item eval loop

r? `@ghost`

Let's try a small one first. Doing this in general has some bad cache coherence issues because the query caches are laid out in `Vec<QueryResult>` lists per query where each index refers to a `DefId` in the same order as we're iterating. Iterating two or more lists at the same time does have cache issues, so I want to poke a bit at it to see if we can't merge just a few of them at a time.
@bors
Copy link
Collaborator

bors commented May 9, 2025

⌛ Trying commit 0b6e493 with merge d3f3fe4...

bors added a commit to rust-lang-ci/rust that referenced this pull request May 9, 2025
Merge mir query analysis invocations

r? `@ghost`

same thing as rust-lang#140854 just a different set of queries
@bors
Copy link
Collaborator

bors commented May 9, 2025

☀️ Try build successful - checks-actions
Build commit: d3f3fe4 (d3f3fe44be5bf3c2623eed5609fc19cef74fb365)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d3f3fe4): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

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.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@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.2% [0.2%, 0.3%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.4% [-0.4%, -0.3%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.1% [-0.4%, 0.3%] 6

Max RSS (memory usage)

Results (primary -0.5%, secondary -2.8%)

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.9% [0.6%, 1.6%] 4
Regressions ❌
(secondary)
1.6% [1.6%, 1.6%] 1
Improvements ✅
(primary)
-0.7% [-1.8%, -0.4%] 22
Improvements ✅
(secondary)
-3.9% [-5.2%, -3.2%] 4
All ❌✅ (primary) -0.5% [-1.8%, 1.6%] 26

Cycles

Results (primary 0.7%, secondary -4.3%)

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.8% [0.4%, 1.5%] 8
Regressions ❌
(secondary)
1.4% [1.2%, 1.5%] 2
Improvements ✅
(primary)
-0.4% [-0.4%, -0.4%] 1
Improvements ✅
(secondary)
-8.0% [-8.4%, -7.3%] 3
All ❌✅ (primary) 0.7% [-0.4%, 1.5%] 9

Binary size

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

Bootstrap: 773.559s -> 775.822s (0.29%)
Artifact size: 365.71 MiB -> 365.57 MiB (-0.04%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels May 9, 2025
@oli-obk oli-obk marked this pull request as ready for review May 10, 2025 07:44
@oli-obk
Copy link
Contributor Author

oli-obk commented May 10, 2025

r? @nnethercote

This one doesn't have any branch prediction or cache hit regressions. Likely because the static/const code paths are rare compared with the normal code path

@nnethercote
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented May 10, 2025

📌 Commit 0b6e493 has been approved by nnethercote

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 May 10, 2025
@bors
Copy link
Collaborator

bors commented May 10, 2025

⌛ Testing commit 0b6e493 with merge b105556...

@bors
Copy link
Collaborator

bors commented May 10, 2025

☀️ Test successful - checks-actions
Approved by: nnethercote
Pushing b105556 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 10, 2025
@bors bors merged commit b105556 into rust-lang:master May 10, 2025
7 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 10, 2025
Copy link

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 7e432c4 (parent) -> b105556 (this PR)

Test differences

No test diffs found

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard b10555674f355aca2bfe974e50a0b9ab48eb1d87 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-1: 9124.2s -> 6423.6s (-29.6%)
  2. dist-x86_64-apple: 10065.7s -> 7575.3s (-24.7%)
  3. dist-apple-various: 7452.6s -> 6075.5s (-18.5%)
  4. x86_64-gnu-debug: 5984.0s -> 6478.0s (8.3%)
  5. dist-aarch64-apple: 5006.3s -> 5327.0s (6.4%)
  6. aarch64-gnu-debug: 3933.8s -> 4122.4s (4.8%)
  7. dist-arm-linux: 4791.6s -> 4587.6s (-4.3%)
  8. x86_64-msvc-2: 6975.0s -> 6700.9s (-3.9%)
  9. x86_64-gnu-llvm-19-2: 6233.6s -> 6007.6s (-3.6%)
  10. dist-aarch64-linux: 5443.2s -> 5634.6s (3.5%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b105556): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.2% [0.2%, 0.3%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.4% [-0.4%, -0.3%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.1% [-0.4%, 0.3%] 6

Max RSS (memory usage)

Results (primary -0.4%, secondary -1.5%)

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.9% [0.5%, 1.5%] 3
Regressions ❌
(secondary)
1.4% [1.1%, 1.6%] 2
Improvements ✅
(primary)
-0.9% [-1.5%, -0.5%] 8
Improvements ✅
(secondary)
-3.0% [-3.3%, -2.3%] 4
All ❌✅ (primary) -0.4% [-1.5%, 1.5%] 11

Cycles

Results (primary 0.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)
1.0% [0.7%, 1.3%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.8% [-0.8%, -0.8%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [-0.8%, 1.3%] 3

Binary size

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

Bootstrap: 772.638s -> 772.555s (-0.01%)
Artifact size: 365.44 MiB -> 365.35 MiB (-0.03%)

@oli-obk oli-obk deleted the merge-queries branch May 10, 2025 19:29
@panstromek
Copy link
Contributor

Perf triage:

All changes in unicode-normalization. Incremental full improvements outweigh small non-incremental regressions. This matches results in pre-merge run, so I assume it's expected.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label May 12, 2025
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