An arena is also a good way to handle these sorts of allocations, it also locates the inner slices sequentially, which is good for utilising cpu cache.
the inner slices could also reference the static data, avoiding heap allocation.
An arena is also a good way to handle these sorts of allocations, it also locates the inner slices sequentially, which is good for utilising cpu cache.
the inner slices could also reference the static data, avoiding heap allocation.