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

Use two vectors in nearest_common_ancestor. #50365

Merged
merged 1 commit into from May 3, 2018

Conversation

Projects
None yet
4 participants
@nnethercote
Contributor

nnethercote commented May 1, 2018

When looking at any scope in scope chain A, we only need to look for
matches among scopes previously seen in scope chain B, and vice versa.
This halves the number of "seen before?" comparisons, speeding up some
runs of style-servo, clap-rs, and syn by 1--2%.

Thanks to @kirillkh for the suggestion.

r? @nikomatsakis

Use two vectors in nearest_common_ancestor.
When looking at any scope in scope chain A, we only need to look for
matches among scopes previously seen in scope chain B, and vice versa.
This halves the number of "seen before?" comparisons, speeding up some
runs of style-servo, clap-rs, and syn by 1--2%.
@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented May 1, 2018

@bors r+

@bors

This comment has been minimized.

Contributor

bors commented May 1, 2018

📌 Commit 94c5d38 has been approved by nikomatsakis

@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented May 1, 2018

@bors rollup

kennytm added a commit to kennytm/rust that referenced this pull request May 3, 2018

Rollup merge of rust-lang#50365 - nnethercote:nearest_common_ancestor…
…-two-vecs, r=nikomatsakis

Use two vectors in nearest_common_ancestor.

When looking at any scope in scope chain A, we only need to look for
matches among scopes previously seen in scope chain B, and vice versa.
This halves the number of "seen before?" comparisons, speeding up some
runs of style-servo, clap-rs, and syn by 1--2%.

Thanks to @kirillkh for the suggestion.

r? @nikomatsakis

bors added a commit that referenced this pull request May 3, 2018

Auto merge of #50413 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests

Successful merges:

 - #50302 (Add query search order check)
 - #50320 (Fix invalid path generation in rustdoc search)
 - #50349 (Rename "show type declaration" to "show declaration")
 - #50360 (Clarify wordings of the `unstable_name_collision` lint.)
 - #50365 (Use two vectors in nearest_common_ancestor.)
 - #50393 (Allow unaligned reads in constants)
 - #50401 (Revert "Implement FromStr for PathBuf")
 - #50407 (Always inline simple BytePos and CharPos methods.)
 - #50417 (Update Cargo)
 - #50421 (Fix ICE when using a..=b in a closure.)

Failed merges:

kennytm added a commit to kennytm/rust that referenced this pull request May 3, 2018

Rollup merge of rust-lang#50365 - nnethercote:nearest_common_ancestor…
…-two-vecs, r=nikomatsakis

Use two vectors in nearest_common_ancestor.

When looking at any scope in scope chain A, we only need to look for
matches among scopes previously seen in scope chain B, and vice versa.
This halves the number of "seen before?" comparisons, speeding up some
runs of style-servo, clap-rs, and syn by 1--2%.

Thanks to @kirillkh for the suggestion.

r? @nikomatsakis

bors added a commit that referenced this pull request May 3, 2018

Auto merge of #50413 - kennytm:rollup, r=kennytm
Rollup of 12 pull requests

Successful merges:

 - #50302 (Add query search order check)
 - #50320 (Fix invalid path generation in rustdoc search)
 - #50349 (Rename "show type declaration" to "show declaration")
 - #50360 (Clarify wordings of the `unstable_name_collision` lint.)
 - #50365 (Use two vectors in nearest_common_ancestor.)
 - #50393 (Allow unaligned reads in constants)
 - #50401 (Revert "Implement FromStr for PathBuf")
 - #50406 (Forbid constructing empty identifiers from concat_idents)
 - #50407 (Always inline simple BytePos and CharPos methods.)
 - #50416 (check if the token is a lifetime before parsing)
 - #50417 (Update Cargo)
 - #50421 (Fix ICE when using a..=b in a closure.)

Failed merges:

@bors bors merged commit 94c5d38 into rust-lang:master May 3, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@nnethercote nnethercote deleted the nnethercote:nearest_common_ancestor-two-vecs branch May 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment