3 ms·
I think another solution could be to use an arena/memory pool to replace indices with references. But indices are still safer than raw pointers - vec access do
by pornel 3y ago
I think another solution could be to use an arena/memory pool to replace indices with references.
But indices are still safer than raw pointers - vec access does bounds checks. You can make indices typed if you’re worried about mixing them up.
- burntsushi 3y agoI mentioned slab/bump allocators in the README. But whether it works with the Ptrlist type punning is unclear to me.