Skip to content
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

Avoid the use of a context manager in hot code path #14331

Merged
merged 2 commits into from
Dec 21, 2022
Merged

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Dec 21, 2022

Mypyc can't optimize context managers yet, so it's best to avoid them in hot code paths.

This sacrifices some code quality for a considerable perf gain. This improved self-check performance by 4%.

Mypyc can't optimize context managers yet, so it's best to avoid them in
hot code paths.

This sacrifices some code quality for a considerable perf gain. This
improved self-check performance by 4%.
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JukkaL JukkaL merged commit 8733599 into master Dec 21, 2022
@JukkaL JukkaL deleted the faster-recursive-3 branch December 21, 2022 12:56
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