Skip to content

Only resolve obligations for is_never checks on bare type variables [-0.18% avg] - #102

Draft
xmakro wants to merge 1 commit into
perf/base-0809from
perf/rm0809-isnever
Draft

Only resolve obligations for is_never checks on bare type variables [-0.18% avg]#102
xmakro wants to merge 1 commit into
perf/base-0809from
perf/rm0809-isnever

Conversation

@xmakro

@xmakro xmakro commented Aug 10, 2026

Copy link
Copy Markdown
Owner

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.

…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.
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.

1 participant