23 May
2020
23 May
'20
5:08 p.m.
On 22/05/2020 16:08, Andrey Semashev via Boost wrote:
One allocation might not be a problem, and small_ring_queue allows to avoid even that, if the optimal capacity is known at compile time.
However, std::deque continues to dynamically allocate chunks as you push and pop elements, even if the average number of enqueued elements stays the same. This is avoided by ring queues.
Independently from a future Boost.RingQueue or integrated into Boost.CircularBufer (which I think it's be correct module), having a boost::container::deque that conserves capacity (already allocated buffers) so that continuous dynamic allocation does not happen is a nice to have feature. Best, Ion