Skip to content

Conversation

petrochenkov
Copy link
Contributor

In the past falling back to reparsing pretty-printed strings was common, so some of this logic had to live in rustc_parse, but now the reparsing fallback is only used in two corner cases so we can move this logic to rustc_ast which makes many things simpler.

It also helps to fix MacArgs::inner_tokens for MacArgs::Eq with non-literal expressions, which is done in the second commit.
r? @nnethercote

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 21, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 21, 2022
@nnethercote
Copy link
Contributor

Very nice: +130 -298

@bors r+

@bors
Copy link
Collaborator

bors commented May 21, 2022

📌 Commit d0607449eac63ec1fcb400a77968bc399309e609 has been approved by nnethercote

@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 May 21, 2022
@petrochenkov
Copy link
Contributor Author

@bors r=nnethercote

@bors
Copy link
Collaborator

bors commented May 22, 2022

📌 Commit 09b4c7c has been approved by nnethercote

@bors
Copy link
Collaborator

bors commented May 22, 2022

⌛ Testing commit 09b4c7c with merge 4bb4dc4...

@bors
Copy link
Collaborator

bors commented May 22, 2022

☀️ Test successful - checks-actions
Approved by: nnethercote
Pushing 4bb4dc4 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 22, 2022
@bors bors merged commit 4bb4dc4 into rust-lang:master May 22, 2022
@rustbot rustbot added this to the 1.63.0 milestone May 22, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4bb4dc4): comparison url.

Instruction count

  • Primary benchmarks: 🎉 relevant improvements found
  • Secondary benchmarks: 🎉 relevant improvements found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 0 0 6 7 6
mean2 N/A N/A -0.3% -0.5% -0.3%
max N/A N/A -0.4% -0.6% -0.4%

Max RSS (memory usage)

Results
  • Primary benchmarks: 😿 relevant regression found
  • Secondary benchmarks: mixed results
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 1 2 0 1 1
mean2 1.5% 1.4% N/A -1.7% 1.5%
max 1.5% 1.7% N/A -1.7% 1.5%

Cycles

Results
  • Primary benchmarks: mixed results
  • Secondary benchmarks: mixed results
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 1 1 3 6 4
mean2 2.3% 1.8% -1.7% -2.4% -0.7%
max 2.3% 1.8% -2.0% -2.9% 2.3%

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. number of relevant changes 2 3

  2. the arithmetic mean of the percent change 2 3

@nnethercote
Copy link
Contributor

A small performance win too, nice.

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-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.

7 participants