Skip to content

Use SmallVec in LocalizedConstraintGraph - #163190

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
jackh726:smallvec-in-constraint-graph
Sep 23, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
jackh726:smallvec-in-constraint-graph

Conversation

@jackh726

Copy link
Copy Markdown
Member

This seems to be good for some of the rustc-perf benches that remain regressed under polonius.

r? lqd

LLM-generated perf summary table image

@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 Sep 23, 2026
@rustbot

rustbot commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

lqd is not on the review rotation at the moment.
They may take a while to respond.

@jackh726

Copy link
Copy Markdown
Member Author

Disclosure: An LLM was used to identify this perf effect and to check the performance of the solution.

@rust-cloud-vms
rust-cloud-vms Bot force-pushed the smallvec-in-constraint-graph branch from 4a5cea6 to df8fb0f Compare September 23, 2026 02:06
@jackh726

Copy link
Copy Markdown
Member Author

@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 Sep 23, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 23, 2026
@rust-bors

rust-bors Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: dff5fd0 (dff5fd0bfef918ba59d9d229c89163a3d68274f9)
Base parent: 1a82b5d (1a82b5d4f4c79ead5ce15b6e586af24d2a20300c)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown

Finished benchmarking commit (dff5fd0): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

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

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 2
Improvements ✅
(primary)
-0.4% [-1.0%, -0.2%] 52
Improvements ✅
(secondary)
-0.4% [-0.8%, -0.2%] 32
All ❌✅ (primary) -0.4% [-1.0%, -0.2%] 52

Max RSS (memory usage)

Results (primary 2.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

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

Cycles

Results (secondary 1.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

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

Binary size

Results (primary -0.2%, secondary -0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.2%, -0.0%] 21
Improvements ✅
(secondary)
-0.1% [-0.2%, -0.0%] 37
All ❌✅ (primary) -0.2% [-0.2%, -0.0%] 21

Bootstrap: 490.182s -> 493.573s (0.69%)
Artifact size: 406.51 MiB -> 406.55 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 23, 2026
) -> Self {
let mut edges: FxHashMap<_, FxIndexSet<_>> = FxHashMap::default();
let mut logical_edges: IndexVec<_, FxIndexSet<_>> = IndexVec::new();
let mut edges: FxHashMap<_, SmallVec<[RegionVid; 4]>> = FxHashMap::default();

@lqd lqd Sep 23, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

random thought I had while reading this: it may be slightly be easier to minmax the best cutoffs for physical and logical edges in the future if there was only a SmallVec<_> type ascription here.

View changes since the review

@lqd

lqd commented Sep 23, 2026

Copy link
Copy Markdown
Member

🚀 @bors r+

@rust-bors

rust-bors Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

📌 Commit df8fb0f has been approved by lqd

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Sep 23, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors p=6
Scheduling this before the next rollup

@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 23, 2026
@rust-bors

rust-bors Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: lqd
Duration: 3h 6m 48s
Pushing 9a9d194 to main...

@rust-bors
rust-bors Bot merged commit 9a9d194 into rust-lang:main Sep 23, 2026
15 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor
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 52d0fd8 (parent) -> 9a9d194 (this PR)

Test differences

No test diffs found

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 9a9d1946d1e119676b7a6a8a26a264061e61027d --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. optional-test-x86_64-gnu-autodiff: 32m 10s -> 53m 25s (+66.1%)
  2. test-x86_64-gnu-distcheck: 1h 26m -> 2h 20m (+62.6%)
  3. dist-i686-mingw: 35m 27s -> 55m 10s (+55.6%)
  4. test-i686-gnu-nopt-1: 1h 23m -> 2h 3m (+48.1%)
  5. test-x86_64-gnu-llvm-22-3: 1h 16m -> 1h 50m (+45.5%)
  6. test-x86_64-msvc-ext1: 1h 41m -> 2h 23m (+41.3%)
  7. test-i686-msvc: 1h 54m -> 2h 38m (+38.6%)
  8. dist-ohos-aarch64: 55m 45s -> 1h 16m (+37.8%)
  9. dist-x86_64-msvc-alt: 2h 57m -> 1h 53m (-36.2%)
  10. dist-arm-linux-gnueabi: 1h 5m -> 1h 28m (+35.3%)
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
Copy Markdown

Finished benchmarking commit (9a9d194): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 2
Improvements ✅
(primary)
-0.4% [-1.0%, -0.2%] 49
Improvements ✅
(secondary)
-0.4% [-0.7%, -0.2%] 30
All ❌✅ (primary) -0.4% [-1.0%, -0.2%] 49

Max RSS (memory usage)

Results (primary -2.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

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

Cycles

Results (secondary 39.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
39.3% [37.0%, 41.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 494.96s -> 489.957s (-1.01%)
Artifact size: 406.90 MiB -> 407.04 MiB (0.04%)

@jackh726
jackh726 deleted the smallvec-in-constraint-graph branch September 23, 2026 14:25
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. 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