-
Notifications
You must be signed in to change notification settings - Fork 89
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
Erase Functionality for static_map #142
Conversation
Can one of the admins verify this patch? |
add to whitelist |
ok to test |
@Nicolas-Iskos could you include some of the performance graphs in the PR description? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the summary documentation above the static_map
class to include a discussion of erase
? Include:
- Limitations about concurrent insert/find/erase
- Limitations for erase when a erased sentinel was not provided
- Enforced for bulk API, but not device API
First commit from auto formatter! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for implementing this feature!
I've stepped through the core functionality and compared it to WarpCore
's SingleValueHashTable
implementation. tl;dr: looks good. 👍
Depending on the use case, one way is not always better than the other. If I remember correctly, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nicolas-Iskos Thanks for your care and persistency being put into this PR! Looks great to me! Depending on how you see it, we can leave the benchmark refactoring to a separate PR.
Of course, and thank you guys for all the feedback! I'd be fine leaving the benchmark refactoring to a separate PR. I could even do that with the PR for |
We can do this once NVIDIA/nvbench#80 is merged. |
Erase functionality is now supported for
static_map
via the use of an additional sentinel value. Erased slots can be reused during future insertions. Users can specify that they want erase functionality by providing anerased_key_sentinel
during construction. Included below are some plots showing the performance oferase
and demonstrating that neitherinsert
norfind
incur a performance regression as a result of adding erase support. For each plot,num_keys=1E8
.