ruff
2a404f15 - [ty] Restore builder-local constraint subtype cache (#25844)

Commit
60 days ago
[ty] Restore builder-local constraint subtype cache (#25844) ## Summary PR #25786 originally cached repeated constraint-set subtype checks on `ConstraintSetBuilder`. [During review](https://github.com/astral-sh/ruff/pull/25786#discussion_r3383378278), that cache was replaced with a Salsa-tracked query to allow reuse across builders. On pytest-robotframework, the tracked query does not recover the same performance: current main remains roughly 25% slower than the commit immediately before #25778. This restores the builder-local `FxHashMap` cache and routes the two transitive-pivot subtype checks through it. The separate type-variable-bound precheck from #25786 remains unchanged. In 80 balanced, interleaved runs of pytest-robotframework using clean profiling builds, the results were: | Revision | Median | Paired change vs. pre-#25778 | | --- | ---: | ---: | | Pre-#25778 (`1676ec8013`) | 103.2 ms | — | | Current main (`8f2caa6a04`) | 128.3 ms | +24.9% | | This PR | 106.9 ms | +3.7% | This PR is 16.9% faster than current main. All three revisions produced byte-for-byte identical diagnostics. The full `ty_python_semantic` suite (558 tests), focused Clippy, and repository hooks pass.
Author
Parents
Loading