Visitar URL original
bpo-40116: Add insertion order bit-vector to dict values to allow dicts to share keys more freely. by markshannon · Pull Request #28520 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20221223134400/https://github.com/python/cpython/pull/28520
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

bpo-40116: Add insertion order bit-vector to dict values to allow dicts to share keys more freely. #28520

Merged
merged 4 commits into from Oct 6, 2021

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Sep 22, 2021 •

@markshannon markshannon requested a review from methane as a code owner Sep 22, 2021
@markshannon markshannon added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Sep 22, 2021
@bedevere-bot
Copy link

bedevere-bot commented Sep 22, 2021

🤖 New build scheduled with the buildbot fleet by @markshannon for commit 8214006 🤖

If you want to schedule another build, you need to add the "🔨 test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Sep 22, 2021
@markshannon
Copy link
Member Author

markshannon commented Sep 22, 2021

No significant performance change https://gist.github.com/markshannon/814e38650cbe4ba1639e31294d4879e6

Objects/dictobject.c Outdated Show resolved Hide resolved
Objects/dictobject.c Outdated Show resolved Hide resolved
Objects/dictobject.c Outdated Show resolved Hide resolved
Objects/dictobject.c Outdated Show resolved Hide resolved
@markshannon markshannon added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Oct 1, 2021
@bedevere-bot
Copy link

bedevere-bot commented Oct 1, 2021

🤖 New build scheduled with the buildbot fleet by @markshannon for commit 51c1ec8 🤖

If you want to schedule another build, you need to add the "🔨 test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Oct 1, 2021
@markshannon
Copy link
Member Author

markshannon commented Oct 1, 2021

Despite providing no speedup, I'd like to merge this, as it enables compact objects.
Work-in-progress implementation of compact objects here: https://github.com/faster-cpython/cpython/tree/inline-attributes-with-opt (there are a few leaks that I need to hunt down, and some general cleanup to be done).

@markshannon markshannon added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Oct 1, 2021
@bedevere-bot
Copy link

bedevere-bot commented Oct 1, 2021

🤖 New build scheduled with the buildbot fleet by @markshannon for commit 2a13a2d 🤖

If you want to schedule another build, you need to add the "🔨 test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Oct 1, 2021
@markshannon
Copy link
Member Author

markshannon commented Oct 4, 2021

The build bot failures are cancellations (presumably timeouts).

@markshannon
Copy link
Member Author

markshannon commented Oct 6, 2021

I'm merging this now as I have https://github.com/faster-cpython/cpython/tree/inline-attributes-with-opt working and it shows measurable speedups as well as reduced memory consumption.

@markshannon markshannon merged commit a7252f8 into python:main Oct 6, 2021
65 of 69 checks passed
@markshannon markshannon deleted the dict-order-bit-vector branch Oct 6, 2021
@@ -2534,7 +2549,7 @@ dict_merge(PyObject *a, PyObject *b, int override)
key = entry->me_key;
hash = entry->me_hash;
if (other->ma_values)
value = other->ma_values[i];
value = other->ma_values->values[i];
Copy link
Member

@methane methane Feb 24, 2022

Choose a reason for hiding this comment

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

I noticed that this change may break order of merged dict.

methane added a commit to methane/cpython that referenced this pull request Feb 24, 2022
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.

None yet

4 participants