Skip to content
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

Don't recheck obligations if we have learned nothing new #8285

Merged
merged 1 commit into from Apr 2, 2021

Conversation

flodiebold
Copy link
Member

This is just the most trivial check: If no inference variables have been updated, and there are no new obligations, we can just skip trying to solve them again. We could be smarter about it, but this already helps quite a bit, and I don't want to touch this too much before we replace the inference table by Chalk's.

Fixes #8263 (well, improves it quite a bit).

This is just the most trivial check: If no inference variables have been
updated, and there are no new obligations, we can just skip trying to
solve them again. We could be smarter about it, but this already helps
quite a bit, and I don't want to touch this too much before we replace
the inference table by Chalk's.

Fixes rust-lang#8263 (well, improves it quite a bit).
@matklad
Copy link
Member

matklad commented Apr 2, 2021

bors r+

Thanks!

@bors
Copy link
Contributor

bors bot commented Apr 2, 2021

@bors bors bot merged commit 00ce7ae into rust-lang:master Apr 2, 2021
@matklad
Copy link
Member

matklad commented Apr 2, 2021

This improves times a bunch:

Inference:           25.31s, 233ginstr, 792mb
Inference:           23.35s, 206ginstr, 792mb

changelog fix: improve typechecking performance by avoiding re-checking unchanged obligations in an accidentally quadratic way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resolve_ty_as_possible is slow
2 participants