Only resolve obligations for is_never checks on bare type variables [-0.18% avg] - #102
Draft
xmakro wants to merge 1 commit into
Draft
Only resolve obligations for is_never checks on bare type variables [-0.18% avg]#102xmakro wants to merge 1 commit into
xmakro wants to merge 1 commit into
Conversation
…bles Both never-type checks in expression checking ran a full fulfillment round-trip whenever the expression type contained any inference variable, though the type is already resolved at that point and only a bare type variable can still become !. Answer from the type kind and keep the expensive path for the type-variable case. Also deduplicates repeated 'constant expression depends on a generic parameter' errors, since anonymous const obligations are no longer re-selected once per enclosing expression.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both never-type checks in expression checking ran a full fulfillment round-trip whenever the expression type contained any inference variable, though the type is already resolved at that point and only a bare type variable can still become the never type. Answer from the type kind and keep the expensive path for the type-variable case.
This also deduplicates repeated 'constant expression depends on a generic parameter' errors, since anonymous const obligations are no longer re-selected once per enclosing expression. On the July base this needed 7 ui test blesses, all benign: five from the error deduplication, two from the same lints emitted in source order instead of query-completion order.
Measured alone at head 969b803 (clean from-scratch ThinLTO plus jemalloc stage2 build per side, instructions:u, Check/Debug/Opt across Full/IncrFull/IncrUnchanged/IncrPatched, 551 cells): -0.18% mean, 44 cells improved by at least 0.25%, 1 regressed. Top cells: wg-grammar-new-solver -4.8% to -5.3% across profiles, deep-vector -4.1% to -4.5%. The largest single slice of the old combined branch.