]> git.lizzy.rs Git - rust.git/commit
Add a fast path for identical regions in lub_concrete_regions
authorBjörn Steinbrink <bsteinbr@gmail.com>
Thu, 10 Jan 2019 18:28:42 +0000 (19:28 +0100)
committerBjörn Steinbrink <bsteinbr@gmail.com>
Thu, 10 Jan 2019 20:28:06 +0000 (21:28 +0100)
commit5f402b827726607b04887c7c7b8d8b95cce8f487
tree0862e62ffbc115f2119bdeba949e0a944c176157
parent07600c939b594b39f560bc969caca2e92498435a
Add a fast path for identical regions in lub_concrete_regions

In functions with lots of region constraint, if the fixed point
iteration converges only slowly, a lot of the var/var constraints will
have equal regions most of the time. Yet, we still perform the LUB
calculation and try to intern the result. Especially the latter incurs
quite some overhead.

This reduces the take taken by the item bodies checking pass for the
unicode_normalization crate by about 75%.
src/librustc/infer/lexical_region_resolve/mod.rs