Skip to content

[PERF] Inline some attribute parsing code - #166385

Open
JonathanBrouwer wants to merge 1 commit into
rust-lang:mainfrom
JonathanBrouwer:attrs-perf
Open

JonathanBrouwer wants to merge 1 commit into
rust-lang:mainfrom
JonathanBrouwer:attrs-perf

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

No description provided.

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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 Nov 23, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member 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 Nov 23, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 23, 2026
[PERF] Inline some attribute parsing code
@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 0a1ca1c (0a1ca1ced04563b0938ec163307d07d745f62e91)
Base parent: 0259d5e (0259d5e9a81c6af08e40f8c204f2c0c41dca1647)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (0a1ca1c): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=iffy rustc-perf
@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.3%] 2
Improvements ✅
(primary)
-0.2% [-0.2%, -0.2%] 3
Improvements ✅
(secondary)
-0.4% [-0.6%, -0.3%] 13
All ❌✅ (primary) -0.2% [-0.2%, -0.2%] 3

Max RSS (memory usage)

Results (primary -3.1%, 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)
- - 0
Regressions ❌
(secondary)
3.2% [0.6%, 4.6%] 3
Improvements ✅
(primary)
-3.1% [-3.2%, -3.0%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.1% [-3.2%, -3.0%] 2

Cycles

Results (secondary -1.7%)

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.9% [3.7%, 6.1%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.0% [-7.8%, -0.4%] 4
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 460.582s -> 463.547s (0.64%)
Artifact size: 405.69 MiB -> 406.65 MiB (0.24%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Nov 23, 2026
@rust-bors

This comment has been minimized.

@JonathanBrouwer
JonathanBrouwer marked this pull request as ready for review November 23, 2026 19:03
@rustbot

rustbot commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann

@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 Nov 23, 2026
@rustbot

rustbot commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

r? @mati865

rustbot has assigned @mati865.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 79 candidates
  • Random selection from 21 candidates

@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@jdonszelmann

jdonszelmann commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

r? me

r=me if you rebase on main, hell yea. Even if it doesn't do that much for perf, still an easy win and it's not technically complex

@rustbot

rustbot commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r=jdonszelmann

@rust-bors

rust-bors Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

📌 Commit bd362ac has been tentatively approved by jdonszelmann

It will be put into the queue for this repository once PR CI succeeds.

@rust-bors rust-bors Bot 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 Nov 24, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors rust-bors Bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 24, 2026
@rust-bors

rust-bors Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

⚠️ A new commit f099c5f4cd45eedc61d8fead3306c7562dc82c45 was pushed.

This pull request was unapproved.

@JonathanBrouwer

JonathanBrouwer commented Nov 24, 2026 •

Copy link
Copy Markdown
Member Author

Whoopsie
@bors r=jdonszelmann

@rust-bors

rust-bors Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

📌 Commit f099c5f has been tentatively approved by jdonszelmann

It will be put into the queue for this repository once PR CI succeeds.

@rust-bors rust-bors Bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 24, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 24, 2026
…szelmann

[PERF] Inline some attribute parsing code
rust-bors Bot pushed a commit that referenced this pull request Nov 24, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #166385 ([PERF] Inline some attribute parsing code)
 - #166013 (make `ReturnsVisitor` more accurate )
 - #166033 (Abby: move span out of leaf region constraint)
 - #166088 (Make rigid alias invalidation explicit when transitioning to PostAnalysis)
 - #166365 (Drop references to codebuild)
 - #166399 (Add safety section for intrinsic volatile operations)
 - #166439 (remove some incorrect docs from volatile intrinsics)
 - #166445 (fix test enum-repr-abi)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) perf-regression Performance regression. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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