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

Add a parallel forEach() method in NonBlockingHashMap #369

Open
justinhorvitz opened this issue Nov 13, 2022 · 2 comments
Open

Add a parallel forEach() method in NonBlockingHashMap #369

justinhorvitz opened this issue Nov 13, 2022 · 2 comments

Comments

@justinhorvitz
Copy link

Feature Request

Add a method to NonBlockingHashMap similar to the parallel forEach method in ConcurrentHashMap.

Background

In Bazel we currently use Guava's interners, but we are looking at other strategies for interning in order to reduce storage cost. Our estimate is that > 6% of Bazel's memory cost is from the interning data structures (not including the elements, just the storage).

We are interested in switching from ConcurrentHashMap to NonBlockingHashMap primarily for the getk() method, which would allow Bazel's main graph map to double as an interner for its keys, replacing Guava interners and the storage cost they entail. A parallel iteration method would close the gap vs our current usage of ConcurrentHashMap.

@Bue-von-hon
Copy link

@nitsanw i'll give it a try

@justinhorvitz
Copy link
Author

Fyi - we no longer need this feature for Bazel, as we found a way to pack the keys into the values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants