Skip to content

Conversation

@camsteffen
Copy link
Contributor

Less indirection should be better perf.

@rustbot
Copy link
Collaborator

rustbot commented Sep 5, 2025

r? @spastorino

rustbot has assigned @spastorino.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. labels Sep 5, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 5, 2025

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

Some changes occurred in compiler/rustc_builtin_macros/src/autodiff.rs

cc @ZuseZ4

@petrochenkov
Copy link
Contributor

Indirection is removed, but expansion may now do more work to box the stuff and then unbox it again.
@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 5, 2025
Remove boxes from ast list elements
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 5, 2025
@rust-bors
Copy link

rust-bors bot commented Sep 5, 2025

☀️ Try build successful (CI)
Build commit: cd2fe74 (cd2fe744675bd21a03fe74405a44184f1dbf682e, parent: ad85bc524b1ad696e42061ad8338d382dffbdbe5)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (cd2fe74): 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)
- - 0
Regressions ❌
(secondary)
0.2% [0.1%, 0.4%] 12
Improvements ✅
(primary)
-0.2% [-0.2%, -0.1%] 4
Improvements ✅
(secondary)
-0.3% [-0.4%, -0.1%] 8
All ❌✅ (primary) -0.2% [-0.2%, -0.1%] 4

Max RSS (memory usage)

Results (primary -0.6%, secondary -2.9%)

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)
- - 0
Improvements ✅
(primary)
-0.6% [-0.6%, -0.6%] 1
Improvements ✅
(secondary)
-2.9% [-3.2%, -2.6%] 3
All ❌✅ (primary) -0.6% [-0.6%, -0.6%] 1

Cycles

Results (primary 1.6%, secondary 2.6%)

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

mean range count
Regressions ❌
(primary)
1.6% [1.6%, 1.6%] 1
Regressions ❌
(secondary)
2.6% [2.2%, 3.0%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.6% [1.6%, 1.6%] 1

Binary size

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

Bootstrap: 467.829s -> 467.149s (-0.15%)
Artifact size: 390.58 MiB -> 390.60 MiB (0.00%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 5, 2025
@camsteffen
Copy link
Contributor Author

Seems neutral/mixed with a bit of max RSS improvements?

@camsteffen
Copy link
Contributor Author

Moved a Box::new to try and fix regressions. Profiling shows the regressions are in parse_param_general::{closure#0}.

@ZuseZ4
Copy link
Member

ZuseZ4 commented Sep 6, 2025

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 6, 2025
Remove boxes from ast list elements
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 6, 2025
@rust-bors
Copy link

rust-bors bot commented Sep 7, 2025

☀️ Try build successful (CI)
Build commit: 4c3b5d3 (4c3b5d3811bd68ed990231b0dcfaad8b5ab255af, parent: 1ed3cd7030718935a5c5e5c8f6581f36d8be179f)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4c3b5d3): comparison URL.

Overall result: ❌ regressions - 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)
0.4% [0.1%, 0.8%] 19
Regressions ❌
(secondary)
0.2% [0.1%, 0.4%] 22
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.4% [-0.5%, -0.3%] 3
All ❌✅ (primary) 0.4% [0.1%, 0.8%] 19

Max RSS (memory usage)

Results (primary 1.3%, secondary -2.2%)

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

mean range count
Regressions ❌
(primary)
1.3% [1.3%, 1.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-3.4%, -0.7%] 4
All ❌✅ (primary) 1.3% [1.3%, 1.3%] 1

Cycles

Results (primary 3.1%)

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

mean range count
Regressions ❌
(primary)
3.1% [3.1%, 3.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.1% [3.1%, 3.1%] 1

Binary size

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

Bootstrap: 465.747s -> 468.049s (0.49%)
Artifact size: 387.43 MiB -> 387.47 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 7, 2025
@camsteffen
Copy link
Contributor Author

@rustbot author

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 7, 2025
@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 5, 2025
Remove boxes from ast list elements
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 5, 2025
@rust-bors
Copy link

rust-bors bot commented Oct 5, 2025

💥 Test timed out after 21600s

@camsteffen
Copy link
Contributor Author

@ZuseZ4 can you give it another try?

@ZuseZ4
Copy link
Member

ZuseZ4 commented Oct 7, 2025

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 7, 2025
Remove boxes from ast list elements
@rust-bors
Copy link

rust-bors bot commented Oct 7, 2025

☀️ Try build successful (CI)
Build commit: c10c5b1 (c10c5b1ea7de995e6ec34ef6dcda49324b4c2810, parent: fed46ffd5059e11669df1bd9406b02914c3fb73f)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c10c5b1): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

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.

@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.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 2
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) -0.2% [-0.2%, -0.2%] 2

Max RSS (memory usage)

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

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)
1.7% [0.9%, 2.4%] 2
Improvements ✅
(primary)
-2.4% [-3.2%, -1.6%] 2
Improvements ✅
(secondary)
-2.0% [-2.6%, -0.6%] 4
All ❌✅ (primary) -2.4% [-3.2%, -1.6%] 2

Cycles

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

Binary size

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

Bootstrap: 474.165s -> 473.322s (-0.18%)
Artifact size: 388.38 MiB -> 388.39 MiB (0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 8, 2025
@camsteffen
Copy link
Contributor Author

This looks like a small win now. I think the one regression is noise.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 8, 2025
@cjgillot
Copy link
Contributor

Thanks! The code is even a bit cleaner.
@bors r+

@bors
Copy link
Collaborator

bors commented Oct 15, 2025

📌 Commit 0ea65e0 has been approved by cjgillot

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 15, 2025
@bors
Copy link
Collaborator

bors commented Oct 16, 2025

⌛ Testing commit 0ea65e0 with merge f524236...

@bors
Copy link
Collaborator

bors commented Oct 16, 2025

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing f524236 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 16, 2025
@bors bors merged commit f524236 into rust-lang:master Oct 16, 2025
12 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 16, 2025
@github-actions
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 402ce0e (parent) -> f524236 (this PR)

Test differences

Show 10 test diffs

10 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard f5242367f4acf0130c9b68e6956531b2cb73bd38 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-x86_64-apple: 6985.7s -> 9880.1s (41.4%)
  2. aarch64-apple: 8235.5s -> 10172.0s (23.5%)
  3. dist-apple-various: 4036.2s -> 4817.9s (19.4%)
  4. pr-check-1: 1757.8s -> 1541.4s (-12.3%)
  5. test-various: 4334.8s -> 4791.1s (10.5%)
  6. dist-aarch64-apple: 7990.0s -> 8689.0s (8.7%)
  7. x86_64-gnu-tools: 3707.9s -> 3390.3s (-8.6%)
  8. x86_64-msvc-ext2: 6309.5s -> 5787.9s (-8.3%)
  9. i686-msvc-1: 10301.7s -> 9544.6s (-7.3%)
  10. dist-aarch64-msvc: 5407.3s -> 5735.0s (6.1%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f524236): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

@rustbot label: -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.1% [0.1%, 0.1%] 2
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-0.2%, -0.2%] 1

Max RSS (memory usage)

Results (secondary 0.6%)

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

Cycles

Results (primary 2.4%, secondary 2.0%)

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

mean range count
Regressions ❌
(primary)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
2.0% [2.0%, 2.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.4% [2.4%, 2.4%] 1

Binary size

Results (secondary -0.0%)

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

Bootstrap: 474.904s -> 475.759s (0.18%)
Artifact size: 388.04 MiB -> 388.06 MiB (0.01%)

flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 31, 2025
Remove boxes from ast list elements

Less indirection should be better perf.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants