[ty] Compact retained semantic arrays by charliermarsh · Pull Request #25454 · astral-sh/ruff (original) (raw)

Summary

Reduces the memory retained by Salsa-cached semantic indexes by using a FrozenIndexVec for index-addressed immutable arrays, like the FrozenMap abstraction.

Apart from a >1% memory reduction, we see a 1% improvement on attrs, anyio, hydra-zen, multithreaded; 1% regression on pydantic and freqtrade.