-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
make index type NonZeroUsize
#42
Comments
We could do this — it might be useful for the However, 0 is a valid slab index. If we did this, we would either end up wasting one slot on thread 0's slab, or need to do some munging of indices ourselves to avoid that. This may be worth it, however. |
Would it be reasonable to add an associated |
@inanna-malick hmm, in theory, that could work! Could be worth experimenting with. |
I have a sketch of what it might look like here - it's not quite complete (I don't quite understand everything that's going on around key generation & what would be required to skip 0 there) but it shows the approximate scope of the changes https://github.com/inanna-malick/sharded-slab/tree/associated-key-type |
It'd be nice to be able to have an
Option<Key>
which didn't take up more space thanKey
in memory.The text was updated successfully, but these errors were encountered: