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

Implement specialized spliterators on {Entry,Key}Set #20

Open
rovarga opened this issue Sep 5, 2018 · 4 comments
Open

Implement specialized spliterators on {Entry,Key}Set #20

rovarga opened this issue Sep 5, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@rovarga
Copy link
Collaborator

rovarga commented Sep 5, 2018

We are currently using SpliteratorIterators backed by our custom iterators. This is a bit wasteful, because it allocates an additional object and in case of MutableTrieMap (and hence Mutable{Entry,Key}Set) we end up wrapping the immutable internal structure with a mutable wrapper for each object.
The second part is important, as it is completely unneeded as spliterators cannot modify state, hence we should be able to just traverse an immutable view of the map.

@rovarga rovarga added the enhancement New feature or request label Sep 5, 2018
@rovarga rovarga self-assigned this Feb 18, 2020
@asad-awadia
Copy link

@rovarga are the keys ordered? (Skiplist/tree map)

@rovarga
Copy link
Collaborator Author

rovarga commented Mar 23, 2022

@rovarga are the keys ordered? (Skiplist/tree map)

No. A Triemap is akin to a ConcurrentHashMap in this regard.
That having been said, a ConcurrentNavigableMap with O(1) snapshot capability could be built using the approach used for internal organization of TrieMap -- I think :)

@asad-awadia
Copy link

@rovarga

approach used for internal organization of TrieMap

What do you mean by this?

@rovarga
Copy link
Collaborator Author

rovarga commented Mar 31, 2022

@rovarga

approach used for internal organization of TrieMap

What do you mean by this?

I mean an equivalent of a TreeMap could be done via #87 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants