Skip to content

[perf] Fast path for coercions of TY == TY #142973

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

compiler-errors
Copy link
Member

No description provided.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 24, 2025
@compiler-errors
Copy link
Member Author

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jun 24, 2025

⌛ Trying commit 5d1b220 with merge 5b86323

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jun 24, 2025
[perf] Fast path for coercions of TY == TY
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 24, 2025
@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member Author

ugh oops i shouldn't have pushed lol

@bors2 try @rust-timer queue

@rust-bors
Copy link

rust-bors bot commented Jun 24, 2025

⌛ Trying commit 34842e5 with merge 5bbf4be

(The previously running try build was automatically cancelled.)

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jun 24, 2025
[perf] Fast path for coercions of TY == TY
@rust-timer

This comment has been minimized.

@@ -6,7 +6,6 @@ LL | let tmp0 = 3;
LL | let tmp1 = &tmp0;
| ^^^^^ borrowed value does not live long enough
LL | repeater3(tmp1)
| --------------- borrow later captured here by trait object
Copy link
Member Author

Choose a reason for hiding this comment

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

This suggestion is was never valid. repeater3 is what's responsible for doing the unsizing, and the fact that we were reporting this as capturing A just because it has the signature fn<'a, A: 'a>(A) -> Box<dyn Tr + 'a> is kinda... coincidental.

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-19-1 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [crashes] tests/crashes/122681.rs ... ok
test [crashes] tests/crashes/122710.rs ... ok
test [crashes] tests/crashes/122903-1.rs ... ok
test [crashes] tests/crashes/122904-2.rs ... ok
2025-06-24T19:28:06.024763Z ERROR compiletest::runtest: fatal error, panic: "crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`."
test [crashes] tests/crashes/123140.rs ... FAILED
test [crashes] tests/crashes/123157.rs ... ok
test [crashes] tests/crashes/123629.rs ... ok
test [crashes] tests/crashes/123690.rs ... ok
test [crashes] tests/crashes/123810.rs ... ok
---
test [crashes] tests/crashes/125801.rs ... ok
test [crashes] tests/crashes/122823.rs ... ok
test [crashes] tests/crashes/125841.rs ... ok
test [crashes] tests/crashes/126268.rs ... ok
2025-06-24T19:28:06.833949Z ERROR compiletest::runtest: fatal error, panic: "crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`."
test [crashes] tests/crashes/126269.rs ... FAILED
test [crashes] tests/crashes/126443.rs ... ok
test [crashes] tests/crashes/126667.rs ... ok
test [crashes] tests/crashes/126680.rs ... ok
test [crashes] tests/crashes/126696.rs ... ok
---
test [crashes] tests/crashes/130797.rs ... ok
test [crashes] tests/crashes/131046.rs ... ok
test [crashes] tests/crashes/130970.rs ... ok
test [crashes] tests/crashes/131292.rs ... ignored, only executed when the architecture is x86_64
2025-06-24T19:28:07.615682Z ERROR compiletest::runtest: fatal error, panic: "crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`."
test [crashes] tests/crashes/131048.rs ... FAILED
test [crashes] tests/crashes/131295.rs ... ok
test [crashes] tests/crashes/131052.rs ... ok
test [crashes] tests/crashes/131347.rs ... ok
test [crashes] tests/crashes/131373.rs ... ok
---
test [crashes] tests/crashes/133808.rs ... ok
test [crashes] tests/crashes/131342.rs ... ok
test [crashes] tests/crashes/134061.rs ... ok
test [crashes] tests/crashes/133966.rs ... ok
2025-06-24T19:28:08.525556Z ERROR compiletest::runtest: fatal error, panic: "crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`."
test [crashes] tests/crashes/134174.rs ... ok
test [crashes] tests/crashes/134217.rs ... FAILED
test [crashes] tests/crashes/134479.rs ... ok
test [crashes] tests/crashes/134587.rs ... ok
test [crashes] tests/crashes/134654.rs ... ignored, only executed when the architecture is x86_64
---
failures:

---- [crashes] tests/crashes/123140.rs stdout ----

error: crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`.

thread '[crashes] tests/crashes/123140.rs' panicked at src/tools/compiletest/src/runtest/crashes.rs:17:18:
fatal error
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- [crashes] tests/crashes/126269.rs stdout ----

error: crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`.

thread '[crashes] tests/crashes/126269.rs' panicked at src/tools/compiletest/src/runtest/crashes.rs:17:18:
fatal error

---- [crashes] tests/crashes/131048.rs stdout ----

error: crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`.

thread '[crashes] tests/crashes/131048.rs' panicked at src/tools/compiletest/src/runtest/crashes.rs:17:18:
fatal error

---- [crashes] tests/crashes/134217.rs stdout ----

error: crashtest no longer crashes/triggers ICE, hooray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`.

thread '[crashes] tests/crashes/134217.rs' panicked at src/tools/compiletest/src/runtest/crashes.rs:17:18:
fatal error


@rust-bors
Copy link

rust-bors bot commented Jun 24, 2025

☀️ Try build successful (CI)
Build commit: 5bbf4be (5bbf4be1c185dd3063fde118728da0716d13ec7b, parent: 36b21637e93b038453924d3c66821089e71d8baa)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5bbf4be): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@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)
2.9% [2.9%, 2.9%] 1
Regressions ❌
(secondary)
0.6% [0.3%, 0.7%] 14
Improvements ✅
(primary)
-0.9% [-5.1%, -0.1%] 85
Improvements ✅
(secondary)
-2.8% [-12.1%, -0.1%] 83
All ❌✅ (primary) -0.9% [-5.1%, 2.9%] 86

Max RSS (memory usage)

Results (primary -2.4%, secondary -0.1%)

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)
4.5% [4.1%, 5.2%] 3
Improvements ✅
(primary)
-2.4% [-5.0%, -0.8%] 9
Improvements ✅
(secondary)
-1.9% [-2.7%, -1.0%] 8
All ❌✅ (primary) -2.4% [-5.0%, -0.8%] 9

Cycles

Results (primary -1.8%, secondary -4.9%)

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

mean range count
Regressions ❌
(primary)
2.8% [2.8%, 2.8%] 1
Regressions ❌
(secondary)
3.3% [3.3%, 3.3%] 1
Improvements ✅
(primary)
-1.9% [-5.1%, -0.6%] 35
Improvements ✅
(secondary)
-5.2% [-9.5%, -1.1%] 30
All ❌✅ (primary) -1.8% [-5.1%, 2.8%] 36

Binary size

Results (primary 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.7% [0.3%, 1.1%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.0%, -0.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [-0.0%, 1.1%] 3

Bootstrap: 689.383s -> 688.515s (-0.13%)
Artifact size: 371.94 MiB -> 371.59 MiB (-0.09%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jun 25, 2025
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