Skip to content
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

rustc_span: Optimize more hygiene operations using Span::map_ctxt #126543

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

petrochenkov
Copy link
Contributor

I missed these in #125017.

@rustbot
Copy link
Collaborator

rustbot commented Jun 16, 2024

r? @lcnr

rustbot has assigned @lcnr.
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 16, 2024
@petrochenkov
Copy link
Contributor 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 Jun 16, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 16, 2024
rustc_span: Optimize more hygiene operations using `Span::map_ctxt`

I missed these in rust-lang#125017.
@bors
Copy link
Contributor

bors commented Jun 16, 2024

⌛ Trying commit c6c1c99 with merge 50b9d2e...

let mut span = self.data();
let mark = span.ctxt.remove_mark();
*self = Span::new(span.lo, span.hi, span.ctxt, span.parent);
let mut mark = ExpnId::root();
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this one is intentionally different from the others (which start as None), may it be documented?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what to document, these functions don't have their own logic and just forward to the underlying SyntaxContext methods, which may have different signatures and have their own documentation.

Copy link
Contributor

Choose a reason for hiding this comment

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

ahhh indeed, apologies, I didn't look at the the function signature

@bors
Copy link
Contributor

bors commented Jun 16, 2024

☀️ Try build successful - checks-actions
Build commit: 50b9d2e (50b9d2eb9f764ce02cfa17a2a62408eed20b535f)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (50b9d2e): 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-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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.3% [0.3%, 0.3%] 4
Improvements ✅
(primary)
-1.1% [-1.4%, -0.2%] 4
Improvements ✅
(secondary)
-0.8% [-2.3%, -0.2%] 4
All ❌✅ (primary) -1.1% [-1.4%, -0.2%] 4

Max RSS (memory usage)

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

Cycles

Results (primary -1.7%)

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.

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

Binary size

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

Bootstrap: 672.776s -> 673.358s (0.09%)
Artifact size: 319.83 MiB -> 320.49 MiB (0.21%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jun 16, 2024
@cjgillot
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jun 16, 2024

📌 Commit c6c1c99 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 Jun 16, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 16, 2024
rustc_span: Optimize more hygiene operations using `Span::map_ctxt`

I missed these in rust-lang#125017.
@bors
Copy link
Contributor

bors commented Jun 16, 2024

⌛ Testing commit c6c1c99 with merge f207da3...

@bors
Copy link
Contributor

bors commented Jun 16, 2024

💥 Test timed out

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 16, 2024
@lqd
Copy link
Member

lqd commented Jun 16, 2024

@bors retry

@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 Jun 16, 2024
@bors
Copy link
Contributor

bors commented Jun 16, 2024

⌛ Testing commit c6c1c99 with merge 6b65c30...

@bors
Copy link
Contributor

bors commented Jun 17, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 17, 2024
@bors bors merged commit 6b65c30 into rust-lang:master Jun 17, 2024
7 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jun 17, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6b65c30): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

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

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.2% [0.2%, 0.2%] 1
Regressions ❌
(secondary)
0.3% [0.2%, 0.4%] 3
Improvements ✅
(primary)
-1.1% [-1.4%, -0.3%] 4
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.2%] 3
All ❌✅ (primary) -0.8% [-1.4%, 0.2%] 5

Max RSS (memory usage)

Results (secondary -3.7%)

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.

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

Cycles

Results (primary -1.5%, secondary 7.4%)

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
7.4% [7.1%, 7.8%] 2
Improvements ✅
(primary)
-1.5% [-1.5%, -1.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.5% [-1.5%, -1.5%] 1

Binary size

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

Bootstrap: 671.362s -> 673.151s (0.27%)
Artifact size: 320.50 MiB -> 320.45 MiB (-0.02%)

@rylev
Copy link
Member

rylev commented Jun 20, 2024

Improvements outweigh the regressions which all seemed to be reversed sometime soon after this landed.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jun 20, 2024
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. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. 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.

9 participants