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
It would be good to reduce the number of dereferences. Ideally, we could use fixed size arrays, since the slab is configured at compile time; however, doing this nicely would require const generics. Alternatively, we could consider using DSTs for at least some of our structs. However, this would require manually managing our allocations, and would still require some boxing — it would take careful design to actually reduce derefs with DSTs.
Since a slab is (almost) always in an Arc in most use-cases, we might want to make the entire slab a DST, reducing at least one box...this could have ergonomic disadvantages though.
The text was updated successfully, but these errors were encountered:
Currently, looking up an item in the slab requires dereferencing three to four
Box
es: the box around the shard slice:sharded-slab/src/lib.rs
Line 202 in b160433
the box around the page data slice (or slices, depending on the operation):
sharded-slab/src/lib.rs
Lines 244 to 249 in b160433
and the box around each page's slot slice:
sharded-slab/src/page/mod.rs
Line 73 in b160433
It would be good to reduce the number of dereferences. Ideally, we could use fixed size arrays, since the slab is configured at compile time; however, doing this nicely would require const generics. Alternatively, we could consider using DSTs for at least some of our structs. However, this would require manually managing our allocations, and would still require some boxing — it would take careful design to actually reduce derefs with DSTs.
Since a slab is (almost) always in an
Arc
in most use-cases, we might want to make the entire slab a DST, reducing at least one box...this could have ergonomic disadvantages though.The text was updated successfully, but these errors were encountered: