Skip to content

Shrink process_obligations #108380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

nnethercote
Copy link
Contributor

r? @ghost

@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 Feb 23, 2023
@nnethercote
Copy link
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 Feb 23, 2023
@bors
Copy link
Collaborator

bors commented Feb 23, 2023

⌛ Trying commit a4c544a237027c5761b6ff83c9c4f81f326ab697 with merge 91ec585233563416f2f29defed8c1366878f4284...

@bors
Copy link
Collaborator

bors commented Feb 23, 2023

☀️ Try build successful - checks-actions
Build commit: 91ec585233563416f2f29defed8c1366878f4284 (91ec585233563416f2f29defed8c1366878f4284)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (91ec585233563416f2f29defed8c1366878f4284): comparison URL.

Overall result: ❌✅ regressions and improvements - 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)
0.7% [0.6%, 0.8%] 2
Regressions ❌
(secondary)
1.5% [1.3%, 1.7%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.3% [-2.3%, -2.3%] 1
All ❌✅ (primary) 0.7% [0.6%, 0.8%] 2

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

Cycles

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

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Feb 23, 2023
@nnethercote
Copy link
Contributor Author

Now we're in the tricky part, determining if the regression on that perf run is real, or bimodality in action, or what. I guess I'll do a few more perf runs and see if there's any consistency.

@bors try @rust-timer queue include=keccak,cranelift

@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 Feb 23, 2023
@bors
Copy link
Collaborator

bors commented Feb 23, 2023

⌛ Trying commit a4c544a237027c5761b6ff83c9c4f81f326ab697 with merge 9dbdd1d0cb395ff62bd2a1086351506e6e892b16...

@nnethercote
Copy link
Contributor Author

Also, hopefully #108253 will win back at least some of the possible losses here.

@nnethercote
Copy link
Contributor Author

nnethercote commented Feb 23, 2023

Here are the local results I got, including some crates from outside the benchmark suite. wast and mime are regressions because they (unusually) hit the len=2 case in needs_process_obligation. I figured regressing them was worth it if we also (a) improve the more common len=1 case, and (b) can avoid the bimodality. The jury is still out on whether (a) and (b) are true, but here are my local icount results:

Benchmark Profile Scenario % Change Significance Threshold? Significance Factor?
wast-54.0.0 check full 3.14% 0.20% 15.72x
mime-0.3.16 check full 2.01% 0.20% 10.06x
keccak check full -1.55% 0.20% 7.75x
cranelift-codegen-0.82.1 check full -0.61% 0.20% 3.04x
unify-linearly check full -0.30% 0.20% 1.52x

And with #108253 also applied:

Benchmark Profile Scenario % Change Significance Threshold? Significance Factor?
keccak check full -3.08% 0.20% 15.39x
wast-54.0.0 check full 2.41% 0.20% 12.05x
mime-0.3.16 check full 2.04% 0.20% 10.19x
cranelift-codegen-0.82.1 check full -1.17% 0.20% 5.87x
unify-linearly check full -0.34% 0.20% 1.68x

@bors
Copy link
Collaborator

bors commented Feb 23, 2023

☀️ Try build successful - checks-actions
Build commit: 9dbdd1d0cb395ff62bd2a1086351506e6e892b16 (9dbdd1d0cb395ff62bd2a1086351506e6e892b16)

1 similar comment
@bors
Copy link
Collaborator

bors commented Feb 23, 2023

☀️ Try build successful - checks-actions
Build commit: 9dbdd1d0cb395ff62bd2a1086351506e6e892b16 (9dbdd1d0cb395ff62bd2a1086351506e6e892b16)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9dbdd1d0cb395ff62bd2a1086351506e6e892b16): 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)
1.8% [1.6%, 1.9%] 2
Regressions ❌
(secondary)
3.7% [3.3%, 4.3%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.8% [1.6%, 1.9%] 2

Max RSS (memory usage)

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

Cycles

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

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 23, 2023
@nnethercote nnethercote force-pushed the shrink-process_obligations branch from a4c544a to 735a7ad Compare February 26, 2023 22:55
@nnethercote
Copy link
Contributor Author

#108253 has merged, let's try again.

@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 Feb 26, 2023
@bors
Copy link
Collaborator

bors commented Feb 26, 2023

⌛ Trying commit 735a7ad00519b83862498cc5075cb0768ffcc929 with merge 4d25994363fdb73137625b1eea5ca76e825b79ae...

@bors
Copy link
Collaborator

bors commented Feb 27, 2023

☀️ Try build successful - checks-actions
Build commit: 4d25994363fdb73137625b1eea5ca76e825b79ae (4d25994363fdb73137625b1eea5ca76e825b79ae)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4d25994363fdb73137625b1eea5ca76e825b79ae): comparison URL.

Overall result: no relevant changes - no 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.

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

Instruction count

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

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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.5% [-4.7%, -4.2%] 2
All ❌✅ (primary) - - 0

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)
3.1% [1.5%, 4.8%] 9
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.1% [1.5%, 4.8%] 9

@rustbot rustbot removed S-waiting-on-perf Status: Waiting on a perf run to be completed. perf-regression Performance regression. labels Feb 27, 2023
@nnethercote
Copy link
Contributor Author

Hmm, regression for keccak. I will let #108253 settle for a while, then come back to this.

Currently it is inlined twice into `needs_process_obligation`, which is
excessive. Splitting it into inline and uninlined halves lets us have
more control.
This micro-optimization made sense before 0 and 1 were special-cased
within this function, but it's now much less important.
And add some useful comments elsewhere.
@nnethercote nnethercote force-pushed the shrink-process_obligations branch from 735a7ad to 2d8d5b7 Compare March 1, 2023 05:26
@nnethercote
Copy link
Contributor Author

Once more with feeling.

@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 1, 2023
@bors
Copy link
Collaborator

bors commented Mar 1, 2023

⌛ Trying commit 2d8d5b7 with merge 7c589d211fab50bf2f306c823c966da1180917b7...

@bors
Copy link
Collaborator

bors commented Mar 1, 2023

☀️ Try build successful - checks-actions
Build commit: 7c589d211fab50bf2f306c823c966da1180917b7 (7c589d211fab50bf2f306c823c966da1180917b7)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7c589d211fab50bf2f306c823c966da1180917b7): comparison URL.

Overall result: no relevant changes - no 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.

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

Instruction count

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

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

Cycles

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

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 1, 2023
@pnkfelix
Copy link
Member

pnkfelix commented Apr 6, 2023

@nnethercote is this supposed to be in S-waiting-on-review? I cannot tell from the comment thread what its current state is. (I.e. I cannot tell whether you are continuing to iterate, or are done and want feedback)

@rustbot label: +S-waiting-on-author -S-waiting-on-review

@pnkfelix pnkfelix 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 Apr 6, 2023
@nnethercote
Copy link
Contributor Author

waiting-on-author is appropriate, thanks.

@Dylan-DPC Dylan-DPC added S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 20, 2023
@nnethercote
Copy link
Contributor Author

I can't get this to work without regressing perf on some benchmarks.

@nnethercote nnethercote deleted the shrink-process_obligations branch July 24, 2023 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. 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.

6 participants