Skip to content

Create the previous dep graph index on a background thread#116375

Closed
Zoxc wants to merge 1 commit intorust-lang:mainfrom
Zoxc:lazy-index
Closed

Create the previous dep graph index on a background thread#116375
Zoxc wants to merge 1 commit intorust-lang:mainfrom
Zoxc:lazy-index

Conversation

@Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Oct 3, 2023

This changes SerializedDepGraph.index to be computed on-demand per dep kind. This means we can immediately start using queries without waiting for the entire index to be constructed. Additionally a background thread is started which computes the entire index, effectively off-loading most of the index construction to the background thread.

BenchmarkBeforeAfterBeforeAfter
TimeTime%MemoryMemory%
🟣 clap:check:unchanged0.4259s0.4225s -0.79%89.65 MiB90.08 MiB 0.48%
🟣 hyper:check:unchanged0.1425s0.1417s -0.53%47.85 MiB47.91 MiB 0.13%
🟣 regex:check:unchanged0.3188s0.3157s -0.97%71.09 MiB71.58 MiB 0.69%
🟣 syn:check:unchanged0.5895s0.5813s💚 -1.38%101.68 MiB102.15 MiB 0.47%
🟣 syntex_syntax:check:unchanged1.4392s1.4361s -0.22%200.62 MiB201.68 MiB 0.53%
Total2.9158s2.8974s -0.63%510.89 MiB513.40 MiB 0.49%
Summary1.0000s0.9922s -0.78%1 byte1.00 bytes 0.46%
BenchmarkBeforeAfterBeforeAfter
TimeTime%MemoryMemory%
🟠 clap:debug:unchanged1.0753s1.0684s -0.64%142.80 MiB142.72 MiB -0.05%
🟠 hyper:debug:unchanged0.2857s0.2847s -0.35%63.06 MiB63.15 MiB 0.13%
🟠 regex:debug:unchanged0.7703s0.7633s -0.90%108.76 MiB109.03 MiB 0.25%
🟠 syn:debug:unchanged1.0596s1.0531s -0.62%142.08 MiB142.18 MiB 0.07%
🟠 syntex_syntax:debug:unchanged2.7530s2.7274s -0.93%308.92 MiB308.63 MiB -0.09%
Total5.9438s5.8969s -0.79%765.62 MiB765.71 MiB 0.01%
Summary1.0000s0.9931s -0.69%1 byte1.00 bytes 0.06%

r? @cjgillot

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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 Oct 3, 2023
fn prefetch(self: &Arc<Self>) {
if !self.index.is_empty() {
let this = self.clone();
thread::spawn(move || {
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we block this on a job server token being available for this extra computation work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if that's performance win as it's more efficient if this completes in a timely manner. setup_index is less efficient than doing all the dep kinds at once.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if that's performance win as it's more efficient if this completes in a timely manner.

I don't really follow. Jobserver token availability isn't about performance, strictly speaking, it's about making sure that we're not consuming more resources than the host has and/or the user is willing to give. We've definitely had complaints about -j1 (for example) not being respected before.

If we don't have a token available, that may mean that we should do the work in-band (i.e., not spawning the thread) even if that is slower. But, that's what's going to happen anyway on a system that's already CPU-saturated - just via kernel scheduling - which is the alternative here, right? So I don't really understand how the token would be a problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess we could add a try_acquire method to the jobserver and only spawn the thread if we get a token. It looks like that would be racy on POSIX though. I'm not sure if macOS or Linux offers a way to do non-blocking reads.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've made the PR check for a free token now. It's a bit racy but probably works fine.

@cjgillot
Copy link
Contributor

cjgillot commented Oct 3, 2023

In a typical compilation, when happens the first use of this reciprocal index?
I'm tempted to say very early, as the first query to be invoked needs it.
In which cases is this beneficial?

@Zoxc
Copy link
Contributor Author

Zoxc commented Oct 7, 2023

In a typical compilation, when happens the first use of this reciprocal index?
I'm tempted to say very early, as the first query to be invoked needs it.

It will end up calling setup_index, which constructs the index for only that query kind. It's beneficial if we don't use too many query kinds (around 23) before the background thread sets them all.

@bors
Copy link
Collaborator

bors commented Dec 13, 2023

☔ The latest upstream changes (presumably #118900) made this pull request unmergeable. Please resolve the merge conflicts.

@wesleywiser
Copy link
Member

Hi @cjgillot, I think this is ready for another round of review as all of the discussion threads have replies from @Zoxc. Thanks!

@rust-log-analyzer

This comment has been minimized.

@Zoxc Zoxc force-pushed the lazy-index branch 3 times, most recently from edf6ef4 to 1b9f6d8 Compare January 19, 2024 06:35
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 8, 2024
Encode dep graph edges directly from the previous graph when promoting

This encodes dep graph edges directly from the previous graph when promoting nodes from a previous session, avoiding allocations / copies.

Based on rust-lang#122064 and rust-lang#116375.

<table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th></tr><tr><td>🟣 <b>clap</b>:check:unchanged</td><td align="right">0.4177s</td><td align="right">0.4072s</td><td align="right">💚  -2.52%</td></tr><tr><td>🟣 <b>hyper</b>:check:unchanged</td><td align="right">0.1430s</td><td align="right">0.1420s</td><td align="right"> -0.69%</td></tr><tr><td>🟣 <b>regex</b>:check:unchanged</td><td align="right">0.3106s</td><td align="right">0.3038s</td><td align="right">💚  -2.19%</td></tr><tr><td>🟣 <b>syn</b>:check:unchanged</td><td align="right">0.5823s</td><td align="right">0.5688s</td><td align="right">💚  -2.33%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check:unchanged</td><td align="right">1.3992s</td><td align="right">1.3692s</td><td align="right">💚  -2.14%</td></tr><tr><td>Total</td><td align="right">2.8528s</td><td align="right">2.7910s</td><td align="right">💚  -2.17%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9803s</td><td align="right">💚  -1.97%</td></tr></table>
@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 10, 2024

Probably should do a perf run here as the result in #122070 was more mixed than expected.

@cjgillot
Copy link
Contributor

@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 Mar 10, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 10, 2024
Create the previous dep graph index on a background thread

This changes `SerializedDepGraph.index` to be computed on-demand per dep kind. This means we can immediately start using queries without waiting for the entire index to be constructed. Additionally a background thread is started which computes the entire index, effectively off-loading most of the index construction to the background thread.

<table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th><td align="right">Memory</td><td align="right">Memory</td><td align="right">%</th></tr><tr><td>🟣 <b>clap</b>:check:unchanged</td><td align="right">0.4259s</td><td align="right">0.4225s</td><td align="right"> -0.79%</td><td align="right">89.65 MiB</td><td align="right">90.08 MiB</td><td align="right"> 0.48%</td></tr><tr><td>🟣 <b>hyper</b>:check:unchanged</td><td align="right">0.1425s</td><td align="right">0.1417s</td><td align="right"> -0.53%</td><td align="right">47.85 MiB</td><td align="right">47.91 MiB</td><td align="right"> 0.13%</td></tr><tr><td>🟣 <b>regex</b>:check:unchanged</td><td align="right">0.3188s</td><td align="right">0.3157s</td><td align="right"> -0.97%</td><td align="right">71.09 MiB</td><td align="right">71.58 MiB</td><td align="right"> 0.69%</td></tr><tr><td>🟣 <b>syn</b>:check:unchanged</td><td align="right">0.5895s</td><td align="right">0.5813s</td><td align="right">💚  -1.38%</td><td align="right">101.68 MiB</td><td align="right">102.15 MiB</td><td align="right"> 0.47%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check:unchanged</td><td align="right">1.4392s</td><td align="right">1.4361s</td><td align="right"> -0.22%</td><td align="right">200.62 MiB</td><td align="right">201.68 MiB</td><td align="right"> 0.53%</td></tr><tr><td>Total</td><td align="right">2.9158s</td><td align="right">2.8974s</td><td align="right"> -0.63%</td><td align="right">510.89 MiB</td><td align="right">513.40 MiB</td><td align="right"> 0.49%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9922s</td><td align="right"> -0.78%</td><td align="right">1 byte</td><td align="right">1.00 bytes</td><td align="right"> 0.46%</td></tr></table>

<table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th><td align="right">Memory</td><td align="right">Memory</td><td align="right">%</th></tr><tr><td>🟠 <b>clap</b>:debug:unchanged</td><td align="right">1.0753s</td><td align="right">1.0684s</td><td align="right"> -0.64%</td><td align="right">142.80 MiB</td><td align="right">142.72 MiB</td><td align="right"> -0.05%</td></tr><tr><td>🟠 <b>hyper</b>:debug:unchanged</td><td align="right">0.2857s</td><td align="right">0.2847s</td><td align="right"> -0.35%</td><td align="right">63.06 MiB</td><td align="right">63.15 MiB</td><td align="right"> 0.13%</td></tr><tr><td>🟠 <b>regex</b>:debug:unchanged</td><td align="right">0.7703s</td><td align="right">0.7633s</td><td align="right"> -0.90%</td><td align="right">108.76 MiB</td><td align="right">109.03 MiB</td><td align="right"> 0.25%</td></tr><tr><td>🟠 <b>syn</b>:debug:unchanged</td><td align="right">1.0596s</td><td align="right">1.0531s</td><td align="right"> -0.62%</td><td align="right">142.08 MiB</td><td align="right">142.18 MiB</td><td align="right"> 0.07%</td></tr><tr><td>🟠 <b>syntex_syntax</b>:debug:unchanged</td><td align="right">2.7530s</td><td align="right">2.7274s</td><td align="right"> -0.93%</td><td align="right">308.92 MiB</td><td align="right">308.63 MiB</td><td align="right"> -0.09%</td></tr><tr><td>Total</td><td align="right">5.9438s</td><td align="right">5.8969s</td><td align="right"> -0.79%</td><td align="right">765.62 MiB</td><td align="right">765.71 MiB</td><td align="right"> 0.01%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9931s</td><td align="right"> -0.69%</td><td align="right">1 byte</td><td align="right">1.00 bytes</td><td align="right"> 0.06%</td></tr></table>

r? `@cjgillot`
@bors
Copy link
Collaborator

bors commented Mar 10, 2024

⌛ Trying commit 1b9f6d8 with merge fa1beb3...

@bors
Copy link
Collaborator

bors commented Mar 10, 2024

☀️ Try build successful - checks-actions
Build commit: fa1beb3 (fa1beb3d6a488d654692efb29b4b14c08b15a554)

1 similar comment
@bors
Copy link
Collaborator

bors commented Mar 10, 2024

☀️ Try build successful - checks-actions
Build commit: fa1beb3 (fa1beb3d6a488d654692efb29b4b14c08b15a554)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (fa1beb3): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

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 a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.0% [0.3%, 3.4%] 103
Regressions ❌
(secondary)
1.5% [0.6%, 2.3%] 27
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.0% [0.3%, 3.4%] 103

Max RSS (memory usage)

Results

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
Regressions ❌
(secondary)
2.3% [1.6%, 3.1%] 3
Improvements ✅
(primary)
-1.1% [-1.1%, -1.1%] 1
Improvements ✅
(secondary)
-3.3% [-6.4%, -1.3%] 54
All ❌✅ (primary) -1.1% [-1.1%, -1.1%] 1

Cycles

Results

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.7% [1.0%, 2.4%] 14
Regressions ❌
(secondary)
3.0% [2.2%, 3.6%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.7% [1.0%, 2.4%] 14

Binary size

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

Bootstrap: 647.634s -> 647.342s (-0.05%)
Artifact size: 310.02 MiB -> 309.93 MiB (-0.03%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Mar 10, 2024
@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 11, 2024

That's quite an odd performance result. It seem to have large wall time regressions which don't show up in the self profiling results nor can I reproduce them locally.

@apiraino
Copy link
Contributor

I think this is waiting on a comment on the perf run? @Zoxc Do you need some directions?
Also a rebase when you have a chance. Thanks!

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 20, 2024
@alex-semenyuk
Copy link
Member

@Zoxc
Form wg-triage. Any updates on this PR?

@alex-semenyuk
Copy link
Member

@Zoxc
From wg-triage. Closed this PR due to inactivity. Feel free to reopen or raised new one. Thanks for your efforts.

@rust-log-analyzer

This comment has been minimized.

@Kobzol
Copy link
Member

Kobzol commented Mar 13, 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 Mar 13, 2025
@bors
Copy link
Collaborator

bors commented Mar 13, 2025

⌛ Trying commit 6fd274a with merge 6c5d278...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 13, 2025
Create the previous dep graph index on a background thread

This changes `SerializedDepGraph.index` to be computed on-demand per dep kind. This means we can immediately start using queries without waiting for the entire index to be constructed. Additionally a background thread is started which computes the entire index, effectively off-loading most of the index construction to the background thread.

<table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th><td align="right">Memory</td><td align="right">Memory</td><td align="right">%</th></tr><tr><td>🟣 <b>clap</b>:check:unchanged</td><td align="right">0.4259s</td><td align="right">0.4225s</td><td align="right"> -0.79%</td><td align="right">89.65 MiB</td><td align="right">90.08 MiB</td><td align="right"> 0.48%</td></tr><tr><td>🟣 <b>hyper</b>:check:unchanged</td><td align="right">0.1425s</td><td align="right">0.1417s</td><td align="right"> -0.53%</td><td align="right">47.85 MiB</td><td align="right">47.91 MiB</td><td align="right"> 0.13%</td></tr><tr><td>🟣 <b>regex</b>:check:unchanged</td><td align="right">0.3188s</td><td align="right">0.3157s</td><td align="right"> -0.97%</td><td align="right">71.09 MiB</td><td align="right">71.58 MiB</td><td align="right"> 0.69%</td></tr><tr><td>🟣 <b>syn</b>:check:unchanged</td><td align="right">0.5895s</td><td align="right">0.5813s</td><td align="right">💚  -1.38%</td><td align="right">101.68 MiB</td><td align="right">102.15 MiB</td><td align="right"> 0.47%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check:unchanged</td><td align="right">1.4392s</td><td align="right">1.4361s</td><td align="right"> -0.22%</td><td align="right">200.62 MiB</td><td align="right">201.68 MiB</td><td align="right"> 0.53%</td></tr><tr><td>Total</td><td align="right">2.9158s</td><td align="right">2.8974s</td><td align="right"> -0.63%</td><td align="right">510.89 MiB</td><td align="right">513.40 MiB</td><td align="right"> 0.49%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9922s</td><td align="right"> -0.78%</td><td align="right">1 byte</td><td align="right">1.00 bytes</td><td align="right"> 0.46%</td></tr></table>

<table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th><td align="right">Memory</td><td align="right">Memory</td><td align="right">%</th></tr><tr><td>🟠 <b>clap</b>:debug:unchanged</td><td align="right">1.0753s</td><td align="right">1.0684s</td><td align="right"> -0.64%</td><td align="right">142.80 MiB</td><td align="right">142.72 MiB</td><td align="right"> -0.05%</td></tr><tr><td>🟠 <b>hyper</b>:debug:unchanged</td><td align="right">0.2857s</td><td align="right">0.2847s</td><td align="right"> -0.35%</td><td align="right">63.06 MiB</td><td align="right">63.15 MiB</td><td align="right"> 0.13%</td></tr><tr><td>🟠 <b>regex</b>:debug:unchanged</td><td align="right">0.7703s</td><td align="right">0.7633s</td><td align="right"> -0.90%</td><td align="right">108.76 MiB</td><td align="right">109.03 MiB</td><td align="right"> 0.25%</td></tr><tr><td>🟠 <b>syn</b>:debug:unchanged</td><td align="right">1.0596s</td><td align="right">1.0531s</td><td align="right"> -0.62%</td><td align="right">142.08 MiB</td><td align="right">142.18 MiB</td><td align="right"> 0.07%</td></tr><tr><td>🟠 <b>syntex_syntax</b>:debug:unchanged</td><td align="right">2.7530s</td><td align="right">2.7274s</td><td align="right"> -0.93%</td><td align="right">308.92 MiB</td><td align="right">308.63 MiB</td><td align="right"> -0.09%</td></tr><tr><td>Total</td><td align="right">5.9438s</td><td align="right">5.8969s</td><td align="right"> -0.79%</td><td align="right">765.62 MiB</td><td align="right">765.71 MiB</td><td align="right"> 0.01%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9931s</td><td align="right"> -0.69%</td><td align="right">1 byte</td><td align="right">1.00 bytes</td><td align="right"> 0.06%</td></tr></table>

r? `@cjgillot`
@bors
Copy link
Collaborator

bors commented Mar 13, 2025

☀️ Try build successful - checks-actions
Build commit: 6c5d278 (6c5d2785dca5db9a5260d000070d2fb7188e3d6d)

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6c5d278): comparison URL.

Overall result: ❌ regressions - 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)
2.4% [0.3%, 4.1%] 121
Regressions ❌
(secondary)
1.2% [0.5%, 2.1%] 24
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 1
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
All ❌✅ (primary) 2.3% [-0.2%, 4.1%] 122

Max RSS (memory usage)

Results (primary -0.1%, secondary -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.7% [0.8%, 3.4%] 3
Regressions ❌
(secondary)
5.6% [5.6%, 5.6%] 1
Improvements ✅
(primary)
-1.9% [-2.1%, -1.6%] 3
Improvements ✅
(secondary)
-2.5% [-2.6%, -2.3%] 3
All ❌✅ (primary) -0.1% [-2.1%, 3.4%] 6

Cycles

Results (primary 1.4%, secondary -1.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.4% [0.6%, 2.2%] 19
Regressions ❌
(secondary)
1.7% [1.3%, 2.1%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.5% [-6.3%, -2.8%] 2
All ❌✅ (primary) 1.4% [0.6%, 2.2%] 19

Binary size

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

Bootstrap: 774.166s -> 776.361s (0.28%)
Artifact size: 365.07 MiB -> 365.07 MiB (0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 13, 2025
@Zoxc Zoxc marked this pull request as draft April 26, 2025 02:57
@bors
Copy link
Collaborator

bors commented May 7, 2025

☔ The latest upstream changes (presumably #139758) made this pull request unmergeable. Please resolve the merge conflicts.

@Zoxc Zoxc force-pushed the lazy-index branch 2 times, most recently from 616e19f to bde2a86 Compare May 7, 2025 22:37
@bors
Copy link
Collaborator

bors commented Oct 28, 2025

☔ The latest upstream changes (presumably #148220) made this pull request unmergeable. Please resolve the merge conflicts.

@Zoxc
Copy link
Contributor Author

Zoxc commented Jan 30, 2026

This no longer appears to be an improvement:

BenchmarkBeforeAfterBeforeAfterBeforeAfter
TimeTime%Physical MemoryPhysical Memory%Committed MemoryCommitted Memory%
🟣 clap:check:unchanged0.2469s0.2466s -0.11%98.87 MiB98.88 MiB 0.01%163.95 MiB164.07 MiB 0.07%
🟣 hyper:check:unchanged0.1071s0.1069s -0.20%62.81 MiB62.75 MiB -0.09%120.05 MiB120.06 MiB 0.02%
🟣 regex:check:unchanged0.1864s0.1878s 0.72%80.26 MiB80.52 MiB 0.33%141.22 MiB141.56 MiB 0.23%
🟣 syn:check:unchanged0.3799s0.3802s 0.07%119.78 MiB119.80 MiB 0.01%184.96 MiB185.03 MiB 0.03%
Total0.9204s0.9215s 0.12%361.72 MiB361.96 MiB 0.07%610.19 MiB610.71 MiB 0.09%
Summary1.0000s1.0012s 0.12%1 byte1.00 bytes 0.07%1 byte1.00 bytes 0.09%
BenchmarkBeforeAfterBeforeAfterBeforeAfter
TimeTime%Physical MemoryPhysical Memory%Committed MemoryCommitted Memory%
🟠 clap:debug:unchanged0.4958s0.4973s 0.29%134.96 MiB134.72 MiB -0.18%204.18 MiB203.97 MiB -0.10%
🟠 hyper:debug:unchanged0.1713s0.1712s -0.06%70.53 MiB70.56 MiB 0.03%128.74 MiB128.78 MiB 0.03%
🟠 regex:debug:unchanged0.3633s0.3645s 0.31%100.68 MiB100.75 MiB 0.07%159.10 MiB159.18 MiB 0.05%
🟠 syn:debug:unchanged0.6150s0.6144s -0.10%145.76 MiB145.92 MiB 0.11%209.50 MiB209.71 MiB 0.10%
Total1.6454s1.6473s 0.11%451.93 MiB451.94 MiB 0.00%701.52 MiB701.64 MiB 0.02%
Summary1.0000s1.0011s 0.11%1 byte1.00 bytes 0.01%1 byte1.00 bytes 0.02%

@Zoxc Zoxc closed this Jan 30, 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 Jan 30, 2026
Kobzol pushed a commit to Kobzol/portable-simd that referenced this pull request Feb 3, 2026
Encode dep graph edges directly from the previous graph when promoting

This encodes dep graph edges directly from the previous graph when promoting nodes from a previous session, avoiding allocations / copies.

~~Based on rust-lang/rust#122064 and rust-lang/rust#116375

<table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th></tr><tr><td>🟣 <b>clap</b>:check:unchanged</td><td align="right">0.4177s</td><td align="right">0.4072s</td><td align="right">💚  -2.52%</td></tr><tr><td>🟣 <b>hyper</b>:check:unchanged</td><td align="right">0.1430s</td><td align="right">0.1420s</td><td align="right"> -0.69%</td></tr><tr><td>🟣 <b>regex</b>:check:unchanged</td><td align="right">0.3106s</td><td align="right">0.3038s</td><td align="right">💚  -2.19%</td></tr><tr><td>🟣 <b>syn</b>:check:unchanged</td><td align="right">0.5823s</td><td align="right">0.5688s</td><td align="right">💚  -2.33%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check:unchanged</td><td align="right">1.3992s</td><td align="right">1.3692s</td><td align="right">💚  -2.14%</td></tr><tr><td>Total</td><td align="right">2.8528s</td><td align="right">2.7910s</td><td align="right">💚  -2.17%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9803s</td><td align="right">💚  -1.97%</td></tr></table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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.