Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Speed up finding function type variables#16562

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
JukkaL merged 2 commits intomasterfromfaster-tests-typevar
Dec 28, 2023
Merged

Conversation

@JukkaL
Copy link
Collaborator

Merge two visitors into a single visitor that is a bit more optimized than the old visitors.

This speeds ups tests, in particular --mypy/test/testcheck.py is about 4% faster andmypy/test/testpythoneval.py is about 3% faster.

Also self-check is about 1% faster, both interpreted and compiled.

This adds more code, but the new code is largely boilerplate, so the difficulty of maintenance seems roughly the same.

This used to be a significant performance bottleneck, especially intests.Merge logic from two type visitors into a single visitor. Also don'trely on generic type query visitors but implement logic for all typesdirectle, since it will be faster.
@github-actions
Copy link
Contributor

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

@JukkaL
Copy link
CollaboratorAuthor

Going to merge this now, to avoid this getting stale. If anybody wants to review this afterwards, I'm happy to address feedback in a follow-up PR.

@JukkaLJukkaL merged commit761965d intomasterDec 28, 2023
@JukkaLJukkaL deleted the faster-tests-typevar branchDecember 28, 2023 11:27
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@JukkaL

[8]ページ先頭

©2009-2025 Movatter.jp