Skip to content

perf: reuse green-marking's edge walk when promoting a node#157781

Draft
xmakro wants to merge 1 commit into
rust-lang:mainfrom
xmakro:perf/dep-graph-edge-reuse
Draft

perf: reuse green-marking's edge walk when promoting a node#157781
xmakro wants to merge 1 commit into
rust-lang:mainfrom
xmakro:perf/dep-graph-edge-reuse

Conversation

@xmakro

@xmakro xmakro commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@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 Jun 11, 2026
// Find the highest edge in the new dep node indices
let edge_max =
edges.clone().map(|i| colors.current(i).unwrap().as_u32()).max().unwrap_or(0);
// Explicit loop: `iter().max()` doesn't inline here, so it doesn't vectorize.

@saethlin saethlin Jun 11, 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.

I would love to see a smaller reproducer of this missed optimization

View changes since the review

@saethlin

Copy link
Copy Markdown
Member

@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 Jun 11, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 11, 2026
perf: reuse green-marking's edge walk when promoting a node
@rust-bors

rust-bors Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 2132d40 (2132d40c0e743607ddcdb42e9fba0ffb4b57eb2b, parent: d2f24127d97d8c795d1cf5fbf6037f9885f34d39)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (2132d40): 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
@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
Improvements ✅
(primary)
-0.4% [-0.8%, -0.2%] 59
Improvements ✅
(secondary)
-0.4% [-1.0%, -0.2%] 35
All ❌✅ (primary) -0.4% [-0.8%, -0.2%] 59

Max RSS (memory usage)

Results (secondary 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)
2.4% [2.4%, 2.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (primary 2.9%, secondary 3.2%)

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

mean range count
Regressions ❌
(primary)
2.9% [2.0%, 4.1%] 20
Regressions ❌
(secondary)
3.2% [2.1%, 4.8%] 15
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.9% [2.0%, 4.1%] 20

Binary size

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

Bootstrap: 518.142s -> 518.408s (0.05%)
Artifact size: 400.91 MiB -> 400.77 MiB (-0.03%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 12, 2026
@xmakro xmakro force-pushed the perf/dep-graph-edge-reuse branch 3 times, most recently from 990196d to 47a8a51 Compare June 12, 2026 04:26
@xmakro xmakro force-pushed the perf/dep-graph-edge-reuse branch from 47a8a51 to a4fd621 Compare June 12, 2026 04:45
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. 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