Skip to content

Comments

New BiLong2ObjectMap implementation#288

Closed
CarlosVara wants to merge 2 commits intoaeron-io:masterfrom
CarlosVara:master
Closed

New BiLong2ObjectMap implementation#288
CarlosVara wants to merge 2 commits intoaeron-io:masterfrom
CarlosVara:master

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

@vyazelenko
Copy link
Contributor

@CarlosVara Thanks for raising the PR. Unfortunately, at this time we cannot accept it as we are planning a large overhaul of Agrona collections in the future.

@vyazelenko vyazelenko closed this Feb 3, 2026
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.

2 participants