Skip to content

Cache non-exhaustive separately from attributes - #74887

Merged
bors merged 1 commit into
rust-lang:masterfrom
Mark-Simulacrum:cache-non-exhaustive
Jul 29, 2020
Merged

Cache non-exhaustive separately from attributes#74887
bors merged 1 commit into
rust-lang:masterfrom
Mark-Simulacrum:cache-non-exhaustive

Conversation

@Mark-Simulacrum

Copy link
Copy Markdown
Member

This prevents cross-crate attribute loading from metadata just for non_exhaustive checking; cross-crate attribute loading implies disk reading and is relatively slow.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @lcnr

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 28, 2020
@Mark-Simulacrum

Copy link
Copy Markdown
MemberAuthor

r? @petrochenkov perhaps

@bors try @rust-timer queue

Locally this is a 2-3% performance win on the smaller crates.

@rust-timer

Copy link
Copy Markdown
Collaborator

Awaiting bors try build completion

@bors

bors commented Jul 28, 2020

Copy link
Copy Markdown
Collaborator

⌛ Trying commit e0fb1d8781bffcf6e4b691f16a781e31b24a1318 with merge 554bc32d7285b816c134bbb13ccde3771cb3987a...

Comment threadsrc/librustc_middle/ty/mod.rs Outdated
Comment threadsrc/librustc_typeck/collect.rs Outdated
@petrochenkov

Copy link
Copy Markdown
Contributor

Implementation LGTM, waiting on perf.

@petrochenkovpetrochenkov added S-waiting-on-perf Status: Waiting on a perf run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 28, 2020
@bors

bors commented Jul 28, 2020

Copy link
Copy Markdown
Collaborator

☀️ Try build successful - checks-actions, checks-azure
Build commit: 554bc32d7285b816c134bbb13ccde3771cb3987a (554bc32d7285b816c134bbb13ccde3771cb3987a)

@rust-timer

Copy link
Copy Markdown
Collaborator

Queued 554bc32d7285b816c134bbb13ccde3771cb3987a with parent 7b3a781, future comparison URL.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking try commit (554bc32d7285b816c134bbb13ccde3771cb3987a): 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

@Mark-Simulacrum

Copy link
Copy Markdown
MemberAuthor

Seems like a clear, if small, win.

@bors r=petrochenkov rollup=never

I suspect it would be good to do this for all other attribute loading, but that can be done in follow-up PRs. I think ideally we want to convert all meaningful attributes into bit flags or so rather than iterating arrays to check for presence.

@bors

bors commented Jul 29, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 13ad232 has been approved by petrochenkov

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 29, 2020
@petrochenkovpetrochenkov removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 29, 2020
@bors

bors commented Jul 29, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 13ad232 with merge 10c3757...

@bors

bors commented Jul 29, 2020

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions, checks-azure
Approved by: petrochenkov
Pushing 10c3757 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Jul 29, 2020
@bors
bors merged commit 10c3757 into rust-lang:masterJul 29, 2020
@Mark-Simulacrum
Mark-Simulacrum deleted the cache-non-exhaustive branch August 3, 2020 21:46
@Mark-Simulacrum

Copy link
Copy Markdown
MemberAuthor

This was a small perf improvement, as expected.

@cuvipercuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.S-waiting-on-borsStatus: 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.

7 participants

@Mark-Simulacrum@rust-highfive@rust-timer@bors@petrochenkov@cuviper@lcnr