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

Avoid Symbol to &str conversions #99401

Merged
merged 1 commit into from
Jul 19, 2022

Conversation

TaKO8Ki
Copy link
Member

@TaKO8Ki TaKO8Ki commented Jul 18, 2022

Symbol::as_str is a slowish operation, so this patch removes some usages of it.

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

r? @wesleywiser

(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 Jul 18, 2022
@wesleywiser
Copy link
Member

@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 Jul 19, 2022
@bors
Copy link
Contributor

bors commented Jul 19, 2022

⌛ Trying commit a22934b with merge e1806892db33932f6cc438dcac0f51a05bb99abe...

@bors
Copy link
Contributor

bors commented Jul 19, 2022

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

@rust-timer
Copy link
Collaborator

Queued e1806892db33932f6cc438dcac0f51a05bb99abe with parent 475aec1, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e1806892db33932f6cc438dcac0f51a05bb99abe): comparison url.

Instruction count

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

Max RSS (memory usage)

Results
  • Primary benchmarks: 🎉 relevant improvement found
  • Secondary benchmarks: 🎉 relevant improvement found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
-0.4% -0.4% 1
Improvements 🎉
(secondary)
-5.1% -5.1% 1
All 😿🎉 (primary) -0.4% -0.4% 1

Cycles

Results
  • Primary benchmarks: mixed results
  • Secondary benchmarks: 🎉 relevant improvement found
mean1 max count2
Regressions 😿
(primary)
3.7% 3.7% 1
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
-2.0% -2.0% 1
Improvements 🎉
(secondary)
-3.5% -3.5% 1
All 😿🎉 (primary) 0.9% 3.7% 2

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

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.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 19, 2022
@nnethercote
Copy link
Contributor

The changed paths must not be hot enough to have a performance effect. But Symbol::as_str is a bit of a dodgy function, so anything that reduces its use is a good thing.

@bors r+

@bors
Copy link
Contributor

bors commented Jul 19, 2022

📌 Commit a22934b has been approved by nnethercote

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 Jul 19, 2022
@nnethercote
Copy link
Contributor

@bors rollup=always

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 19, 2022
…askrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#98028 (Add E0790 as more specific variant of E0283)
 - rust-lang#99384 (use body's param-env when checking if type needs drop)
 - rust-lang#99401 (Avoid `Symbol` to `&str` conversions)
 - rust-lang#99419 (Stabilize `core::task::ready!`)
 - rust-lang#99435 (Revert "Stabilize $$ in Rust 1.63.0")
 - rust-lang#99438 (Improve suggestions for `NonZeroT` <- `T` coercion error)
 - rust-lang#99441 (Update mdbook)
 - rust-lang#99453 (:arrow_up: rust-analyzer)
 - rust-lang#99457 (use `par_for_each_in` in `par_body_owners` and `collect_crate_mono_items`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4815f94 into rust-lang:master Jul 19, 2022
@rustbot rustbot added this to the 1.64.0 milestone Jul 19, 2022
@TaKO8Ki TaKO8Ki deleted the avoid-symbol-to-&str-conversions branch July 19, 2022 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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