Skip to content

Conversation

viciscat
Copy link
Contributor

Title says it all.

I also tried doing a custom implementation of forEach in OpenHashMap to remove that one allocation of MapEntry but I don't know if that's wanted.
Didn't do many javadoc.

@vigna vigna marked this pull request as ready for review September 29, 2025 14:34
@vigna vigna merged commit 27ddd25 into vigna:master Sep 29, 2025
@viciscat
Copy link
Contributor Author

viciscat commented Oct 1, 2025

Ok didn't expect it to be merged, thought some more things would be needed 😅

@vigna
Copy link
Owner

vigna commented Oct 1, 2025

Oh well. Which things?

@viciscat
Copy link
Contributor Author

viciscat commented Oct 1, 2025

doing a custom implementation of forEach for the other maps like what I did in OpenHashMap and better javadoc I guess? pretty sure I didn't put any on the type specific forEach

@vigna
Copy link
Owner

vigna commented Oct 1, 2025

I'm not at a computer, but isn't there some in the interface? Now you'll tell me there's no interface 😆

@viciscat
Copy link
Contributor Author

viciscat commented Oct 1, 2025

Yea there's no interface 😉
For real though, there's no javadoc for the forEach(EntryConsumer) method at line 321, all the others do though

@vigna
Copy link
Owner

vigna commented Oct 1, 2025

You tricked me 😆. Well it shouldn't be difficult to write a default method. I could ask Jules in fact.

@vigna
Copy link
Owner

vigna commented Oct 3, 2025

I also tried doing a custom implementation of forEach in OpenHashMap to remove that one allocation of MapEntry but I don't know if that's wanted. Didn't do many javadoc.

BTW the fast iterators for hash maps do exactly that—they reuse the entry.

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