Skip to content

[EXPERIMENT] Check if isolating Matrix::unspecialize dodges regressions - #161647

Draft
Zalathar wants to merge 1 commit into
rust-lang:mainfrom
Zalathar:insert2
Draft

[EXPERIMENT] Check if isolating Matrix::unspecialize dodges regressions#161647
Zalathar wants to merge 1 commit into
rust-lang:mainfrom
Zalathar:insert2

Conversation

@Zalathar

@Zalathar Zalathar commented Aug 24, 2026

Copy link
Copy Markdown
Member

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 24, 2026
@Zalathar

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 Aug 24, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 24, 2026
[EXPERIMENT] Check if isolating `Matrix::unspecialize` dodges regressions
@panstromek

panstromek commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Maybe I was wrong in the original assesment and the culprit is a different insert call in match checking - there's another one in ConstructorSet::split:

for idx in seen.iter().filter_map(|c| c.as_variant()) {
seen_set.insert(idx);
}

This was pretty cold in cachegrind, so I didn't pay attention to it very much, but at this point it feels like whatever you do there's some spooky regression at a distance, so maybe it's not as innocent as it looks.

(and there's no other insert call in match checking as far as I know, including transitively called ones)

@rust-bors

rust-bors Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 0fd30f7 (0fd30f71aa360d59aa9283318317b761e764e41c)
Base parent: da51146 (da5114692c9ebe46b869488c5f34f92eb10b98c1)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (0fd30f7): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

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

Instruction count

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

Max RSS (memory usage)

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

Cycles

Results (primary -0.3%, secondary -4.6%)

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

mean range count
Regressions ❌
(primary)
2.0% [2.0%, 2.0%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.6% [-2.6%, -2.6%] 1
Improvements ✅
(secondary)
-4.6% [-4.6%, -4.6%] 1
All ❌✅ (primary) -0.3% [-2.6%, 2.0%] 2

Binary size

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

Bootstrap: 469.244s -> 469.33s (0.02%)
Artifact size: 400.19 MiB -> 400.28 MiB (0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 24, 2026
@Zalathar

Copy link
Copy Markdown
Member Author

Let's see if only perturbing ConstructorSet::split causes regressions:

@bors try @rust-timer queue

@rust-timer

Copy link
Copy Markdown
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 Aug 24, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 24, 2026
[EXPERIMENT] Check if isolating `Matrix::unspecialize` dodges regressions
@rust-bors

rust-bors Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 362939d (362939d9b1e7906cedbecdee745c0ed9eec3a41d)
Base parent: 347a1db (347a1dbf428ab92f284e3afafacfa7eb46341a5d)

@rust-timer

Copy link
Copy Markdown
Collaborator

Queued 362939d with parent 347a1db, future comparison URL.
There are currently 2 preceding artifacts in the queue.
It will probably take at least ~3.0 hours until the benchmark run finishes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-perf Status: Waiting on a perf run to be completed. 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.

4 participants