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

Skip to content

Speed up type checking by caching argument inference context #19323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2025

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Jun 21, 2025

This speeds up self check by about 1.5% on my computer, according to perf_compare.py:

...
=== Results ===

master                    4.264s (0.0%) | stdev 0.024s 
HEAD                      4.201s (-1.5%) | stdev 0.030s 

I noticed this bottleneck when I was looking at a CPU profile generated using the script from #19322.

Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@JukkaL JukkaL merged commit be11ab8 into master Jun 21, 2025
19 checks passed
@JukkaL JukkaL deleted the optimize-arg-infer-ctx branch June 21, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants