Skip to content

perf: Keep the first macro syntax-context mapping inline - #162712

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
xmakro:perf-review-20260907/22-marker-first-context
Sep 17, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
xmakro:perf-review-20260907/22-marker-first-context

Conversation

@xmakro

@xmakro xmakro commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

@rustbot rustbot added 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 Sep 13, 2026
@Zalathar

Copy link
Copy Markdown
Member

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 13, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 13, 2026
…ontext, r=<try>

perf: Keep the first macro syntax-context mapping inline
@rust-bors

rust-bors Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 9958cb9 (9958cb970a3f7eb804cf6838e055a9ec9658e486)
Base parent: 67e8d9d (67e8d9d65f33118199f9749343782cc287426587)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (9958cb9): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

@bors rollup=never 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
Improvements ✅
(primary)
-0.4% [-0.9%, -0.1%] 45
Improvements ✅
(secondary)
-0.4% [-0.9%, -0.1%] 28
All ❌✅ (primary) -0.4% [-0.9%, -0.1%] 45

Max RSS (memory usage)

Results (primary -0.4%, secondary 2.3%)

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

mean range count
Regressions ❌
(primary)
0.5% [0.5%, 0.5%] 1
Regressions ❌
(secondary)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
-0.6% [-0.8%, -0.6%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.4% [-0.8%, 0.5%] 4

Cycles

Results (primary -0.5%, secondary 1.8%)

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

mean range count
Regressions ❌
(primary)
0.8% [0.8%, 0.8%] 1
Regressions ❌
(secondary)
3.1% [2.7%, 3.4%] 3
Improvements ✅
(primary)
-0.8% [-1.3%, -0.5%] 4
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 1
All ❌✅ (primary) -0.5% [-1.3%, 0.8%] 5

Binary size

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

Bootstrap: 493.573s -> 498.36s (0.97%)
Artifact size: 406.95 MiB -> 406.91 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 13, 2026
Comment thread compiler/rustc_expand/src/mbe/transcribe.rs Outdated
@rust-log-analyzer

This comment has been minimized.

@Zalathar

Copy link
Copy Markdown
Member

@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 Sep 14, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 14, 2026
…ontext, r=<try>

perf: Keep the first macro syntax-context mapping inline
@rust-bors

rust-bors Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 8b05899 (8b0589988297e22b316bf3a9ad8140a74affbb8c)
Base parent: 4b6d04e (4b6d04e706108ccfeafe2547fbe857dfe8972bad)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (8b05899): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

@bors rollup=never 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
Improvements ✅
(primary)
-0.4% [-1.0%, -0.1%] 63
Improvements ✅
(secondary)
-0.4% [-1.0%, -0.2%] 28
All ❌✅ (primary) -0.4% [-1.0%, -0.1%] 63

Max RSS (memory usage)

Results (primary 0.5%, 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)
3.5% [3.5%, 3.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.5% [-2.5%, -2.5%] 1
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 1
All ❌✅ (primary) 0.5% [-2.5%, 3.5%] 2

Cycles

Results (primary -2.1%, secondary 2.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)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.1% [-2.1%, -2.1%] 1

Binary size

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

Bootstrap: 501.089s -> 493.638s (-1.49%)
Artifact size: 406.85 MiB -> 406.91 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 14, 2026
@petrochenkov petrochenkov self-assigned this Sep 14, 2026
@petrochenkov petrochenkov 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 Sep 14, 2026
@xmakro
xmakro force-pushed the perf-review-20260907/22-marker-first-context branch from 8460e18 to 0361612 Compare September 14, 2026 16:38
@xmakro

xmakro commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

LLM disclosure: used LLM to analyze perf runs and write code that I then simplified

@xmakro
xmakro marked this pull request as ready for review September 14, 2026 17:37
Comment thread compiler/rustc_expand/src/mbe/transcribe.rs Outdated
Comment thread compiler/rustc_expand/src/mbe/transcribe.rs Outdated
@petrochenkov petrochenkov removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 15, 2026
@petrochenkov petrochenkov added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 15, 2026
@xmakro
xmakro force-pushed the perf-review-20260907/22-marker-first-context branch from 0361612 to 677073f Compare September 16, 2026 14:29
@xmakro

xmakro commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

@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 Sep 16, 2026
@petrochenkov

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 677073f has been approved by petrochenkov

It is now in the queue for this repository.

@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 Sep 16, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member

@bors rollup=iffy
Making a rollup of perf-sensitive PRs

rust-bors Bot pushed a commit that referenced this pull request Sep 16, 2026
…uwer

Rollup of 4 perf-sensitive pull requests

Successful merges:

 - #162450 (Cache block seeking results for initialized_at_terminator and _exit)
 - #162543 ([rustc_resolve]  Correctly keep all reexports in `ModChild::reexport_chain`)
 - #162712 (perf: Keep the first macro syntax-context mapping inline)
 - #162747 (Lowering cleanups)
rust-bors Bot pushed a commit that referenced this pull request Sep 16, 2026
…uwer

Rollup of 4 perf-sensitive pull requests

Successful merges:

 - #162450 (Cache block seeking results for initialized_at_terminator and _exit)
 - #162543 ([rustc_resolve]  Correctly keep all reexports in `ModChild::reexport_chain`)
 - #162712 (perf: Keep the first macro syntax-context mapping inline)
 - #162747 (Lowering cleanups)
rust-bors Bot pushed a commit that referenced this pull request Sep 17, 2026
…uwer

Rollup of 4 perf-sensitive pull requests

Successful merges:

 - #162450 (Cache block seeking results for initialized_at_terminator and _exit)
 - #162543 ([rustc_resolve]  Correctly keep all reexports in `ModChild::reexport_chain`)
 - #162712 (perf: Keep the first macro syntax-context mapping inline)
 - #162747 (Lowering cleanups)
rust-bors Bot pushed a commit that referenced this pull request Sep 17, 2026
…uwer

Rollup of 4 perf-sensitive pull requests



Successful merges:

 - #162450 (Cache block seeking results for initialized_at_terminator and _exit)
 - #162543 ([rustc_resolve]  Correctly keep all reexports in `ModChild::reexport_chain`)
 - #162712 (perf: Keep the first macro syntax-context mapping inline)
 - #162747 (Lowering cleanups)
@rust-bors
rust-bors Bot merged commit 867d696 into rust-lang:main Sep 17, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 17, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 17, 2026
Rollup merge of #162712 - xmakro:perf-review-20260907/22-marker-first-context, r=petrochenkov

perf: Keep the first macro syntax-context mapping inline
@rust-timer

Copy link
Copy Markdown
Collaborator

Note

This PR was benchmarked as part of triage of its containing rollup: triage URL.

Finished benchmarking commit (4395c62): comparison URL.

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

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.2%] 5
Improvements ✅
(primary)
-0.4% [-0.9%, -0.2%] 38
Improvements ✅
(secondary)
-0.5% [-0.9%, -0.2%] 17
All ❌✅ (primary) -0.4% [-0.9%, -0.2%] 38

Max RSS (memory usage)

Results (primary -1.2%, secondary -1.3%)

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

mean range count
Regressions ❌
(primary)
1.0% [1.0%, 1.0%] 1
Regressions ❌
(secondary)
2.7% [1.1%, 4.7%] 3
Improvements ✅
(primary)
-2.3% [-2.3%, -2.3%] 2
Improvements ✅
(secondary)
-4.4% [-4.6%, -4.1%] 4
All ❌✅ (primary) -1.2% [-2.3%, 1.0%] 3

Cycles

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

Binary size

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

Bootstrap: missing data
Artifact size: 406.75 MiB -> 408.83 MiB (0.51%)

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

Labels

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.

8 participants