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

Replace Map<Long, Object> by primitive LongObjectHashMap. #13392

Merged
merged 7 commits into from
May 21, 2024

Conversation

bruno-roustant
Copy link
Contributor

No functional changes, only replacements by primitve maps.

Adds LongObjectHashMap and LongIntHashMap to the org.apache.lucene.util.hppc package, with some refactoring.

Adds a dependency to com.carrotsearch.hppc to the join and spatial modules. This dependency is already present in the facet module. This way these packages can use primitive hash map with float or double values.

The changes in the JoinUtil class are a good example of usage of primitive structures. This highly reduces the auto-boxing around primitives.

Copy link
Contributor

@dweiss dweiss left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -16,8 +16,10 @@
*/

/** Index-time and Query-time joins for normalized content */
@SuppressWarnings({"requires-automatic"})
Copy link
Contributor

Choose a reason for hiding this comment

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

I should make hppc a proper module, really... I'll try to do this soon.

@bruno-roustant bruno-roustant merged commit f709999 into apache:main May 21, 2024
3 checks passed
@bruno-roustant bruno-roustant deleted the primitive_map branch May 21, 2024 15:15
bruno-roustant added a commit that referenced this pull request May 23, 2024
Add LongObjectHashMap and replace Map<Long, Object>.
Add LongIntHashMap and replace Map<Long, Int>.
Add HPPC dependency to join and spatial modules for primitive values float and double.
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

3 participants