Skip to content

Conversation

@nikic
Copy link
Contributor

@nikic nikic commented Dec 22, 2018

If the forest is already empty, there is no point in intersecting further.

Also handle the first element separately, so we don't compute an unnecessary intersection between the full forest and the first element, which is always equal to the first element.

This is the second try at fixing #57028, as the previous attempt only recovered part of the regression. I checked locally that this drops time spent in ty::inhabitedness for syn-check a lot, though not to zero.

r? @varkor

If the forest is already empty, there is no point in intersecting
further.

Also handle the first element separately, so we don't compute an
unnecessary intersection between the full forest and the first
element, which is always equal to the first element.
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 22, 2018
@varkor
Copy link
Contributor

varkor commented Dec 22, 2018

@bors r+ p=1

@bors
Copy link
Collaborator

bors commented Dec 22, 2018

📌 Commit f93cbf6 has been approved by varkor

@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 Dec 22, 2018
@bors
Copy link
Collaborator

bors commented Dec 22, 2018

⌛ Testing commit f93cbf6 with merge fa922ab...

bors added a commit that referenced this pull request Dec 22, 2018
Short-circuit DefIdForest::intersection()

If the forest is already empty, there is no point in intersecting further.

Also handle the first element separately, so we don't compute an unnecessary intersection between the full forest and the first element, which is always equal to the first element.

This is the second try at fixing #57028, as the previous attempt only recovered part of the regression. I checked locally that this drops time spent in ty::inhabitedness for syn-check a lot, though not to zero.

r? @varkor
@bors
Copy link
Collaborator

bors commented Dec 22, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: varkor
Pushing fa922ab to master...

@bors bors merged commit f93cbf6 into rust-lang:master Dec 22, 2018
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants