ruff
a32cdce8 - [ty] Improve union and intersection builder performance (#27167)

Commit
29 days ago
[ty] Improve union and intersection builder performance (#27167) ## Summary The `add` operations move the `Union`/`IntersectionBuilder`. This can be noticeable in hot mappings and normalization where the fluent API also isn't required. This PR uses `add_in_place` in more places and also adds such an API to `IntersectionBuilder`. This improves performance by about 1%. I extracted this out of the scripts PR, so please remind that when considering the regression of this PR. I discovered this optimization because the scripts refactor PR increased the size of `UnionBuilder`, making the move more expensive. Since I'm out Monday/Tuesday, feel free to merge. --------- Co-authored-by: Carl Meyer <carl@astral.sh>
Author
Parents
Loading