Skip to content

use CursorRef more #97114

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

Merged
merged 2 commits into from
May 19, 2022
Merged

use CursorRef more #97114

merged 2 commits into from
May 19, 2022

Conversation

klensy
Copy link
Contributor

@klensy klensy commented May 17, 2022

This allows skipping clone of TreeAndSpacing (and TokenTree).

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 17, 2022
@rust-highfive
Copy link
Contributor

r? @lcnr

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 17, 2022
@lcnr
Copy link
Contributor

lcnr commented May 17, 2022

r? rust-lang/compiler

@rust-highfive rust-highfive assigned petrochenkov and unassigned lcnr May 17, 2022
@petrochenkov petrochenkov 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-review Status: Awaiting review from the assignee but also interested parties. labels May 17, 2022
@klensy
Copy link
Contributor Author

klensy commented May 18, 2022

Ha, diff became short, actually. Will squash.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@klensy
Copy link
Contributor Author

klensy commented May 18, 2022

@klensy
Copy link
Contributor Author

klensy commented May 18, 2022

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

If it's intended it should be noted, otherwise it's possible bug?

It's quite possible that it's a source of bugs.

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented May 18, 2022

📌 Commit 05f459e has been approved by petrochenkov

@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 18, 2022
@bors
Copy link
Collaborator

bors commented May 19, 2022

⌛ Testing commit 05f459e with merge 6913c74...

@bors
Copy link
Collaborator

bors commented May 19, 2022

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 6913c74 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 19, 2022
@bors bors merged commit 6913c74 into rust-lang:master May 19, 2022
@rustbot rustbot added this to the 1.63.0 milestone May 19, 2022
@bors bors mentioned this pull request May 19, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6913c74): comparison url.

Instruction count

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

Max RSS (memory usage)

Results
  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: mixed results
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 0 4 0 1 0
mean2 N/A 2.6% N/A -2.6% N/A
max N/A 5.5% N/A -2.6% N/A

Cycles

Results
  • Primary benchmarks: mixed results
  • Secondary benchmarks: 🎉 relevant improvement found
Regressions 😿
(primary)
Regressions 😿
(secondary)
Improvements 🎉
(primary)
Improvements 🎉
(secondary)
All 😿 🎉
(primary)
count1 2 0 2 1 4
mean2 1.4% N/A -2.7% -2.3% -0.7%
max 1.4% N/A -3.7% -2.3% -3.7%

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

  2. the arithmetic mean of the percent change 2

@nnethercote
Copy link
Contributor

Cursor has this comment:

// FIXME: Many uses of this can be replaced with by-reference iterator to avoid clones.

Should that be removed now?

@klensy
Copy link
Contributor Author

klensy commented May 20, 2022

Cursor has this comment:

// FIXME: Many uses of this can be replaced with by-reference iterator to avoid clones.

Should that be removed now?

Yeah, looks like there no more easy to replace places for CursorRef.

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.

10 participants