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

OpenHashMaps.mergePRIMITIVE: Avoid double-hashing key #337

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mhansen
Copy link

@mhansen mhansen commented Nov 19, 2024

The #if VALUES_PRIMITIVE && ! VALUE_CLASS_Boolean comes from the superclass in Map.drv:

#if VALUES_PRIMITIVE && ! VALUE_CLASS_Boolean

The implementation mostly is copied from the method below (merge), with dead code removed because VALUES_PRIMITIVE is always true.

I'm using the METHOD_ARG_VALUE_BINARY_OPERATOR so that we prefer using the JDK ${Primitive}BinaryOperator classes, and fall back to the fastutil primitive-BinaryOperators where not present in the JDK.

I ran the junit tests locally and they pass.

Towards #336

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.

1 participant