Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[ty] Avoid transient AST ID merge map#26185

Merged
MichaReiser merged 1 commit into
mainfrom
micha/avoid-ast-id-merge-map
Jun 21, 2026
Merged

[ty] Avoid transient AST ID merge map#26185
MichaReiser merged 1 commit into
mainfrom
micha/avoid-ast-id-merge-map

Conversation

@MichaReiser

@MichaReiser MichaReiser commented Jun 21, 2026

Copy link
Copy Markdown
Member

Summary

Merge per-scope AST ID maps directly into the final exact-capacity vector, removing a redundant hash table. This removes about 709 KB of transient allocation on Flake8 and 1.47 MB of copies on Sphinx.

Performance

Around 1-2% faster across the board

Test Plan

Testing: Passed ty_python_core tests, Clippy, and repository hooks.

@astral-sh-bot astral-sh-bot Bot added the ty Multi-file analysis & type inference label Jun 21, 2026
@astral-sh-bot

astral-sh-bot Bot commented Jun 21, 2026

Copy link
Copy Markdown

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 94.37%. The percentage of expected errors that received a diagnostic held steady at 89.00%. The number of fully passing files held steady at 94/134.

@astral-sh-bot

astral-sh-bot Bot commented Jun 21, 2026

Copy link
Copy Markdown

Memory usage report

Memory usage unchanged ✅

@astral-sh-bot

astral-sh-bot Bot commented Jun 21, 2026

Copy link
Copy Markdown

ecosystem-analyzer results

No diagnostic changes detected ✅

Full report with detailed diff (timing results)

@MichaReiser MichaReiser force-pushed the micha/avoid-ast-id-merge-map branch from d9b6b7f to c0de927 Compare June 21, 2026 11:24
@MichaReiser MichaReiser force-pushed the micha/avoid-ast-id-merge-map branch from c0de927 to c1982bf Compare June 21, 2026 11:32
@MichaReiser MichaReiser added the performance Potential performance improvement label Jun 21, 2026
@MichaReiser MichaReiser marked this pull request as ready for review June 21, 2026 11:49
@MichaReiser MichaReiser requested a review from a team as a code owner June 21, 2026 11:49
@astral-sh-bot astral-sh-bot Bot requested a review from dhruvmanila June 21, 2026 11:49
@MichaReiser MichaReiser requested review from charliermarsh and removed request for dhruvmanila June 21, 2026 11:50
@MichaReiser MichaReiser merged commit 895a056 into main Jun 21, 2026
60 checks passed
@MichaReiser MichaReiser deleted the micha/avoid-ast-id-merge-map branch June 21, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Potential performance improvement ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants