Open gnzlbg opened 6 years ago
The Triplicate section of this blog post explains why my version of this needs three regions:
https://mikeash.com/pyblog/friday-qa-2012-02-17-ring-buffers-and-mirrored-memory-part-ii.html
I've submitted a PR that implements this #33
Currently each
SliceDeque
is its own allocator, this means that allocating, growing and deallocatingSliceDeque
s require system calls because we are bypassing the global allocator (which recycles memory pages across allocations to avoid system calls).The target is probably the 0.5 release but work for this can already start. The goals I wanted for the allocator are:
SliceDeque
sSliceDeque
s that are allocated and deallocated in a loopMy thoughts on how to attack small
SliceDeque
s are:My thought on how to attack arbitrary large
SliceDeque
s are:Some unknowns I have about this are:
Alloc
trait ? I don't know why we should do this, but it might be something worth toying with[0] : P.-V. Khuong, P. Morin, Array layouts for comparison-based searching, 2017.
pinging @bill-myers because he was interested into getting this into the library