Skip to content

bpo-38613: Optimize set operations of dict keys. #16961

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

Merged
merged 5 commits into from
Nov 7, 2019

Conversation

methane
Copy link
Member

@methane methane commented Oct 28, 2019

@rhettinger
Copy link
Contributor

+1 This looks like a nice improvement.

@methane methane removed the skip news label Oct 29, 2019

tmp = _PyObject_CallMethodIdOneArg(result, &PyId_difference_update, other);
_Py_IDENTIFIER(difference_update);
PyObject *tmp = _PyObject_CallMethodIdOneArg(
Copy link
Member

Choose a reason for hiding this comment

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

I am wondering whether calling set.difference_update(result, other) using fast call can be faster than calling result.difference_update(other). But this is for other issue.

@methane methane merged commit 6cbc84f into python:master Nov 7, 2019
@methane methane deleted the optimize-dictkeys branch November 7, 2019 15:59
@serhiy-storchaka
Copy link
Member

LGTM. Sorry, forgot to approve the PR.

jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request Dec 5, 2019
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance or resource usage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants