-
Notifications
You must be signed in to change notification settings - Fork 325
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
Sparse Set #24
Comments
Yep, this is something we'd be interested in adding. I think one major additional inspiration for the implementation could be LLVM's SparseSet implementation which @milseman says is an implementation of the 1993 paper by Preston Biggs and Linda Torczon. (Incidentally, we had a discussion on SparseSet on the forum's topic on TicketMap.) If I understand correctly, Fireblade's implementation is effectively the same as what this package calls Rather than wrapping I have objections to characterizing |
Thanks for the differentiated support for the topic and I'm very glad I did not put up a request for something nobody else finds useful 😅 . Fireblade implements In regards to memory footprint you are right as well considering the typical implementation of a I am however no expert in the field and barely managed to cobble together my own Thanks again for considering the proposal and I'm looking forward to seeing this become a part of this awesome package sometime in the future 👍 |
A
Sparse Set
is a specialized data structure for storing elements from a large amount of possible values (e.g. natural numbers) that are used very sparingly, optimized for iteration, addition and removal to the set.Use cases are for example are components attached to an entity in an Entity-Component System (ECS), if you are dealing with arrays of indices, but it can also be used comparably to a binary search tree or hash map, ideally outperforming both of them.
The main advantages of a
Sparse Set
are its performance which can beO(1) for it's primary actions (source spareset/lib.rs) and its low memory footprint.
Example Implementations:
Further Reading:
The text was updated successfully, but these errors were encountered: