Skip to content

[experiment] avoid chain in Terminator::successors - #164962

Closed
panstromek wants to merge 1 commit into
rust-lang:mainfrom
panstromek:mk-successors-slices
Closed

panstromek wants to merge 1 commit into
rust-lang:mainfrom
panstromek:mk-successors-slices

Conversation

@panstromek

Copy link
Copy Markdown
Contributor

Just an idea - chain sometimes doesn't optimize as well and this iterator has encountered that issue before. Let's try using array of slices with flatten instead of Chain of slice and Option iterators

@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 Oct 26, 2026
@panstromek

Copy link
Copy Markdown
Contributor 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 Oct 26, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 26, 2026
[experiment] avoid chain in Terminator::successors
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@rust-bors

rust-bors Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 935dd45 (935dd45baa4c49545ad4f039eacbb0e7008a6aac)
Base parent: 8592206 (859220648edee0282af5b56f0b490cd4beb074db)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (935dd45): comparison URL.

Overall result: ❌ regressions - please read:

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.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@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.5% [0.2%, 1.3%] 82
Regressions ❌
(secondary)
0.5% [0.1%, 1.4%] 72
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 1
All ❌✅ (primary) 0.5% [0.2%, 1.3%] 82

Max RSS (memory usage)

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

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

mean range count
Regressions ❌
(primary)
0.5% [0.4%, 0.7%] 5
Regressions ❌
(secondary)
1.4% [1.4%, 1.4%] 1
Improvements ✅
(primary)
-0.8% [-2.3%, -0.5%] 10
Improvements ✅
(secondary)
-1.5% [-2.5%, -0.5%] 2
All ❌✅ (primary) -0.4% [-2.3%, 0.7%] 15

Cycles

Results (primary -0.0%, secondary 1.0%)

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

mean range count
Regressions ❌
(primary)
1.1% [0.4%, 2.3%] 8
Regressions ❌
(secondary)
2.6% [0.8%, 4.5%] 2
Improvements ✅
(primary)
-0.8% [-1.7%, -0.5%] 11
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) -0.0% [-1.7%, 2.3%] 19

Binary size

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

Bootstrap: 488.814s -> 487.859s (-0.20%)
Artifact size: 405.93 MiB -> 405.84 MiB (-0.02%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 26, 2026
@panstromek panstromek closed this Oct 26, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. 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