Skip to content

gh-149807 : frozendict_hash : hash (key, value) pairs rather than keys and values separately#149808

Open
lambda-abstraction wants to merge 2 commits into
python:mainfrom
lambda-abstraction:change-frozendict-hash
Open

gh-149807 : frozendict_hash : hash (key, value) pairs rather than keys and values separately#149808
lambda-abstraction wants to merge 2 commits into
python:mainfrom
lambda-abstraction:change-frozendict-hash

Conversation

@lambda-abstraction
Copy link
Copy Markdown

@lambda-abstraction lambda-abstraction commented May 13, 2026

i used the simple old boost hash_combine rather than directly reusing the tuple xxhash because i think its overkill for the case of combining 2 hashes in a structure where the first elements are different
im sure there is an equally cheap and simple but a better distributed combination function for 2 hashes, but im not sure what it is, so thats open for modification

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 13, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@python-cla-bot
Copy link
Copy Markdown

python-cla-bot Bot commented May 13, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 13, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@lambda-abstraction
Copy link
Copy Markdown
Author

lambda-abstraction commented May 14, 2026

I think making combine_hashes a specialization unroll of tuple xxhash for 2 elements could be good, to avoid creating a tuple and the branching of the loop while using an already trusted algorithm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant