Add a concurrent, append-only SlotMap#31
Open
SabrinaJewson wants to merge 2 commits intoibraheemdev:masterfrom
Open
Add a concurrent, append-only SlotMap#31SabrinaJewson wants to merge 2 commits intoibraheemdev:masterfrom
SlotMap#31SabrinaJewson wants to merge 2 commits intoibraheemdev:masterfrom
Conversation
Contributor
Author
|
Oh, right. CI is failing for two reasons:
|
Owner
|
Thanks, this looks really cool! Just a heads up that it might take me a little while to get around to reviewing it, but the overall direction looks great. |
Merged
Owner
|
What do you think about splitting the buckets API into a separate PR (apart from the new slotmap API)? That would make it easier to review, and hopefully we could merge that part sooner and avoid having to keep it in-sync with new changes — it's already been a while and I'd like to get those changes in. It's also possible that the slotmap API could be a separate crate (but we can have that discussion in the other PR). |
Merged
Contributor
Author
|
Alright, I’ve now rebased on master. And CI passes =) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Apologies for the rewrite-your-entire-crate PR, but you did say I could do this =)
In this PR, we split the logic of
Vecinto two parts: an underlyingBucketstype, which manages the exponentially-growing sequence of buckets, andVecitself, which wrapsBucketsby managing initialization and length. We then writeSlotMapin terms ofBuckets, allowing the implementation to focus on the algorithm, while hiding details of arithmetic and allocation.We have API parity with regular
slotmap(at the time of writing), though not an identical API.