]> git.lizzy.rs Git - rust.git/commit
Use two vectors in nearest_common_ancestor.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 1 May 2018 00:01:02 +0000 (10:01 +1000)
committerNicholas Nethercote <nnethercote@mozilla.com>
Tue, 1 May 2018 12:12:49 +0000 (22:12 +1000)
commit94c5d38f0b5c85e2171dfe7b9ec36954d17f5fe0
treeddc4d00ad6599bca77e7b36e304749b71ae1e79f
parentf76f6fbdea497c3cb536e33387f405cc74b99b76
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%.
src/librustc/middle/region.rs