KEMBAR78
checkexpr: speedup argument count check by huguesb · Pull Request #12703 · python/mypy · GitHub
Skip to content

Conversation

huguesb
Copy link
Contributor

@huguesb huguesb commented May 1, 2022

Replace List with Dict to avoid O(n**2) behavior in check_for_extra_actual_arguments

This manifests for instance when initializing a set with set([...]) instead of a set
literal {...}. For large sets of literals (~80k entries) this change bring the
typechecking of a single set initializer from over 1 min down to under 1s.

Replace List with Dict to avoid O(n**2) behavior in `check_for_extra_actual_arguments`

This manifests for instance when initializing a set with `set([...])` instead of a set
literal `{...}`. For large sets of literals (~80k entries) this change bring the
typechecking of a single set initializer from over 1 min down to under 1s.
@github-actions
Copy link
Contributor

github-actions bot commented May 1, 2022

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

@huguesb
Copy link
Contributor Author

huguesb commented May 1, 2022

windows test failure looks like a flake. Is there any way to re-run the tests without pushing a new commit?

@AlexWaygood
Copy link
Member

windows test failure looks like a flake. Is there any way to re-run the tests without pushing a new commit?

Closing and reopening the PR should trigger a new CI run

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Awesome work. I retriggered the failed step.

@hauntsaninja hauntsaninja merged commit a56ebec into python:master May 1, 2022
@huguesb huguesb deleted the pr-speedup-arg-check branch May 1, 2022 06:09
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.

4 participants