You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
Hi! Thanks a lot for putting this crate up, this is quite a clever idea (thanks @kyren !).
I have a question: would you be interested in adding variants where Index would be smaller in size?
I'm thinking of games where you might have an upper bound in the number of objects that would ever be in your Arena or how many generation you would get. In those case, it's preferable to have Index with a smaller size. For instance:
structIndex32{index:u32,generation:u32}
I guess depending on the use case, indexorgeneration could be made even smaller. We would also need some additional checks to detect whether the maximum generation or sized was reached.
What do you think?
The text was updated successfully, but these errors were encountered:
Nemikolh
changed the title
Variants for the index/generation sizes
Variants with different index/generation type sizes
Aug 23, 2018
I think u32 is too small, since it only takes a few seconds to wrap around.
I am interested in various ways to improve the current implementation in regards to the number of generation tags and their sizes, but need to find time to investigate some more.
I totally agree with you on that last point. We need to experiment more. I came across this article where they use a generation index of 8 bits. The implementation is a bit different, it uses a queue of free indices and enforce that they are not reused unless the queue has reached its maximum capacity.
Once I have the time, I will submit a PR with the experiments I have made.
While it's only a minor change, I submitted PR #16 to optimize the case of Index wrappend into an Option by changing the type of generation to a non-zero integer. Would that be acceptable/useful?
Hi! Thanks a lot for putting this crate up, this is quite a clever idea (thanks @kyren !).
I have a question: would you be interested in adding variants where Index would be smaller in size?
I'm thinking of games where you might have an upper bound in the number of objects that would ever be in your Arena or how many generation you would get. In those case, it's preferable to have
Index
with a smaller size. For instance:I guess depending on the use case,
index
orgeneration
could be made even smaller. We would also need some additional checks to detect whether the maximum generation or sized was reached.What do you think?
The text was updated successfully, but these errors were encountered: