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 deleteSet and difference operations #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

edmundnoble
Copy link

@edmundnoble edmundnoble commented Nov 7, 2024

These operations allow efficient deletes from an IxSet. These are often useful to filter an IxSet in a way that doesn't require rebuilding indices.

@edmundnoble edmundnoble force-pushed the push-kunxlzvyouzn branch 2 times, most recently from 72e45b5 to 25a65ae Compare November 7, 2024 17:22
These operations allow for efficient deletes from an IxSet.
Copy link
Member

@adamgundry adamgundry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for proposing this! I'm also using ixset-typed in a way that would benefit from efficient (filtering and) deletion.

I notice that Data.IxSet.Typed.Ix.deleteSet is at least linear in the size of the map (i.e. the number of distinct keys), and Data.IxSet.typed.difference ignores the index maps. Couldn't we use the index maps to know which specific keys contain elements being deleted, and thereby have something more efficient, in particular in the case of large-ixset \\ small-ixset?

Also, it seems there isn't a filter operation yet, but presumably one add it along the lines of this PR?

cc @kosmikus

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