VireoSDK icon indicating copy to clipboard operation
VireoSDK copied to clipboard

Increase capacity of internal buffer for Queues when buffer is full

Open sanmut opened this issue 6 years ago • 0 comments

On an enqueue operation when the internal buffer is full, the buffer is always resized by one more in size. It is a good idea to increase the capacity (by some heuristic, say double it until certain size and then add by certain size thereafter) so that the subsequent queue operations will not incur a memory allocation (and potentially moving of elements during insertion) performance hit.

sanmut avatar Aug 19 '19 21:08 sanmut