Skip to content

clashing_extern_declarations: Use symbol interning to avoid string alloc. #81453

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 1 commit into from
Jan 30, 2021

Conversation

jumbatm
Copy link
Contributor

@jumbatm jumbatm commented Jan 27, 2021

Use symbol interning as a hack to avoid allocating a string for every symbol name we store in the seen set. This hopefully addresses the minor perf regression described in #80009 (comment).

r? @nagisa

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 27, 2021
@jumbatm
Copy link
Contributor Author

jumbatm commented Jan 27, 2021

Can I get a perf run on this? I'd like to verify that it actually makes an improvement.

@jonas-schievink
Copy link
Contributor

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@bors
Copy link
Collaborator

bors commented Jan 27, 2021

⌛ Trying commit a1a7830 with merge e3e1e319c02abff43ec05f93be37b599825a5fd3...

@bors
Copy link
Collaborator

bors commented Jan 28, 2021

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

@rust-timer
Copy link
Collaborator

Queued e3e1e319c02abff43ec05f93be37b599825a5fd3 with parent a2f8f62, future comparison URL.

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

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 28, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (e3e1e319c02abff43ec05f93be37b599825a5fd3): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

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

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 28, 2021
@nagisa
Copy link
Member

nagisa commented Jan 30, 2021

Doesn't look like this resolved the regression entirely, but there are minor improvements and Symbol > String here regardless

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 30, 2021

📌 Commit a1a7830 has been approved by nagisa

@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 Jan 30, 2021
@bors
Copy link
Collaborator

bors commented Jan 30, 2021

⌛ Testing commit a1a7830 with merge e7e07600fa1ea5bdcee187e76f235cc358b8d32f...

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v2'
##[warning]Failed to download action 'https://github.com/api/repos/actions/checkout/zipball/5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f'. Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
##[warning]Back off 16.253 seconds before retry.
##[warning]Failed to download action 'https://github.com/api/repos/actions/checkout/zipball/5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f'. Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
##[warning]Back off 16.681 seconds before retry.
##[error]A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

@bors
Copy link
Collaborator

bors commented Jan 30, 2021

💔 Test failed - checks-actions

@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 Jan 30, 2021
@nagisa
Copy link
Member

nagisa commented Jan 30, 2021

@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 Jan 30, 2021
@bors
Copy link
Collaborator

bors commented Jan 30, 2021

⌛ Testing commit a1a7830 with merge af5ad5e80928993b4196092db8a311091c3617cf...

@bors
Copy link
Collaborator

bors commented Jan 30, 2021

⌛ Testing commit a1a7830 with merge fd20a8b...

@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Collaborator

bors commented Jan 30, 2021

☀️ Test successful - checks-actions
Approved by: nagisa
Pushing fd20a8b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 30, 2021
@bors bors merged commit fd20a8b into rust-lang:master Jan 30, 2021
@rustbot rustbot added this to the 1.51.0 milestone Jan 30, 2021
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants