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

New BiLong2ObjectMap implementation #288

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CarlosVara
Copy link

This commit introduces a new BiLong2ObjectMap collection, along with a BiLong2NullableObjectMap companion implementation. These two new maps are derived from the existing BiInt2ObjectMap equivalents that are already present in the collections package.

Implementation wise, the BiLong2ObjectMap keeps its keys in a single long[] array, with the 2 key parts stored in adjacent locations. This choice limits the maximum map capacity, but should provide better cache locality for key access.

This commit introduces a new BiLong2ObjectMap collection, along
with a BiLong2NullableObjectMap companion implementation. These
two new maps are derived from the existing BiInt2ObjectMap
equivalents that are already present in the collections package.

Implementation wise, the BiLong2ObjectMap keeps its keys in a
single long[] array, with the 2 key parts stored in adjacent
locations. This choice limits the maximum map capacity, but should
provide better cache locality for key access.
@CarlosVara
Copy link
Author

I see one of the new unit tests has a Java17 only call, will try fix and update the pull request

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