Skip to content

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

Merged
JukkaL merged 2 commits into
masterfrom
faster-recursive-3
Dec 21, 2022
Merged

Avoid the use of a context manager in hot code path#14331
JukkaL merged 2 commits into
masterfrom
faster-recursive-3

Conversation

@JukkaL

@JukkaL JukkaL commented Dec 21, 2022

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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