-
Notifications
You must be signed in to change notification settings - Fork 158
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
Non-Arc iterators / Interior iteration. #285
Comments
I should note this is with a single entry in the map, it gets worse as the map gets larger. |
The If my understanding of quilkin is correct it really looks like the proper solution for your needs is a plan and simple std HashMap with a custom hasher to fit your key type. You'd implement updates to the map by RCU, completely replacing the map each time. Unless need to process hundreds of thousands to millions of key lookups concurrently with equal numbers of insertions/removals/value updates, something like dashmap which pays significant syncronisation cost on every nonmutable access and isn't optimised for iteration (the core assumption behind the design is that 99.9% of operations are single-key ops. For implementing this kind of atomic update, I suggest using Closing as not a bug. |
Hello π I've been benchmarking https://github.com/googleforgames/quilkin and while benchmarking I noticed that we spend a significant amount of CPU time just allocating and dropping the
Arc
inGuardIter
(~5β10%). Because we need to iterate over the map in every packet. In our case the use of the Arc is not really needed because we're immediately consuming the iterator.I was wondering if there's any interest in providing support for iterators that don't use Arc, or providing a way to map/reduce that doesn't involve Arc? I think this would provide significant performance benefits for those who are trying to perform an operation over the whole map immediately over the current implementation.
Code
Flamegraph
The text was updated successfully, but these errors were encountered: