ruff
f8bd77bb - [ty] Share parameter lists with `Arc` (#25735)

Commit
143 days ago
[ty] Share parameter lists with `Arc` (#25735) ## Summary `Signature` values are cloned throughout callable binding, deduplication, partial application, and specialization. Because `Parameters` stored its parameter vector inline, each clone copied the complete parameter list and retained another allocation. This change moves the exact-sized parameter slice and its representation kind into a shared `ParametersData` allocation. Cloning a signature now clones one `Arc`; the uncommon implicit `self` or `cls` annotation update uses copy-on-write. On Home Assistant, this reduced retained memory from 3,230,014,380 bytes to 3,212,250,858 bytes, saving 17,763,522 bytes (0.55%) without diagnostic changes.
Author
Parents
Loading