FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use cache for DictExpr as well by ilevkivskyi · Pull Request #19536 · python/mypy · GitHub

Repository navigation

Use cache for DictExpr as well - #19536

Merged
ilevkivskyi merged 1 commit into
python:masterfrom
ilevkivskyi:cache-dict-expr
Jul 30, 2025
Merged

ilevkivskyi merged 1 commit into
python:masterfrom
ilevkivskyi:cache-dict-expr

Conversation

ilevkivskyi commented Jul 30, 2025 •
edited
Loading

Copy link
Copy Markdown
Member

Fixes #14271
Fixes #14636

TBH examples in those issues are already sufficiently fast (probably because of combined effect of fast dict literals, and the fact that there are some lists and/or function calls in that examples, so some caching already kicks in). But this PR will probably make them even faster.

This has ~0 effect on self-check.

ilevkivskyi requested a review from sterliakov July 30, 2025 01:05

Copy link
Copy Markdown
Contributor

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

sterliakov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Makes sense! Nice that the referenced tickets are already fast enough, maybe it's time to review existing tickets tagged "performance" and see if we have already fixed some pathological cases.

Copy link
Copy Markdown
Member Author

maybe it's time to review existing tickets tagged "performance" and see if we have already fixed some pathological cases.

I already closed couple others, but didn't do any kind of thorough tracker review.

ilevkivskyi merged commit 0f78f9c into python:master Jul 30, 2025
ilevkivskyi deleted the cache-dict-expr branch July 30, 2025 09:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Mypy errors out for deeply nested dictionaries Wildly inconsistent performance for seemingly trivial changes to source code

2 participants


Back | FazBrowse Home | New Git URL