Closed jkelleyrtp closed 3 years ago
There isn't anything more optimized than https://docs.rs/bumpalo/3.6.0/bumpalo/struct.Bump.html#method.alloc_slice_copy or bump.alloc_with(|| old.clone())
.
Or, would it be better to just keep a bump around for each set of objects (ie for caching)?
This depends on the application and size of the objects, locality, etc, but in general doing less (i.e. not cloning and re-allocing) should be faster.
Is there a fast way to copy objects from one bump into another bump, beyond just cloning and allocating?
Or, would it be better to just keep a bump around for each set of objects (ie for caching)?