Skip to content

proc_macro/bridge: Add #[inline] to RunningSameThreadGuard methods #101461

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

mystor
Copy link
Contributor

@mystor mystor commented Sep 5, 2022

This is a potential fix to the perf regression from #101414.

r? @eddyb

This is a potential fix to the perf regression from rust-lang#101414.

r? @eddyb
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 5, 2022
@mystor mystor marked this pull request as ready for review September 5, 2022 18:37
@rustbot
Copy link
Collaborator

rustbot commented Sep 5, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

Some changes occurred in library/proc_macro/src/bridge

cc @rust-lang/wg-rls-2

@eddyb
Copy link
Member

eddyb commented Sep 5, 2022

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 5, 2022
@bors
Copy link
Collaborator

bors commented Sep 5, 2022

⌛ Trying commit 4913884 with merge e3cc1f3a7a5f000cd6334c8776177202a47c67f4...

@bors
Copy link
Collaborator

bors commented Sep 5, 2022

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

@rust-timer
Copy link
Collaborator

Queued e3cc1f3a7a5f000cd6334c8776177202a47c67f4 with parent 2dc703f, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e3cc1f3a7a5f000cd6334c8776177202a47c67f4): 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-review -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.

mean1 range count2
Regressions ❌
(primary)
0.9% [0.9%, 1.0%] 2
Regressions ❌
(secondary)
2.0% [1.8%, 2.3%] 6
Improvements ✅
(primary)
-0.8% [-1.0%, -0.3%] 8
Improvements ✅
(secondary)
-1.1% [-1.4%, -1.0%] 6
All ❌✅ (primary) -0.4% [-1.0%, 1.0%] 10

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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.3% [3.3%, 3.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
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.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.4% [-3.4%, -3.4%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.4% [-3.4%, -3.4%] 1

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 6, 2022
@Kobzol
Copy link
Contributor

Kobzol commented Sep 6, 2022

I think that both #101414 and this PR is mostly perf-neutral. All the affected benchmarks have recently become bimodal and are very noisy.

@apiraino apiraino added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Apr 17, 2023
@dtolnay
Copy link
Member

dtolnay commented Oct 28, 2023

According to #101414 (comment), "the regressions flagged [in #101414] are almost certainly noise". I don't think we need to pursue this further.

Thanks anyway for the diligence in following up!

@dtolnay dtolnay closed this Oct 28, 2023
@dtolnay dtolnay self-assigned this Mar 25, 2024
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-review Status: Awaiting review from the assignee but also interested parties. T-libs-api Relevant to the library API 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