Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase capacity of internal buffer for Queues when buffer is full #641

Open
sanmut opened this issue Aug 19, 2019 · 0 comments
Open

Increase capacity of internal buffer for Queues when buffer is full #641

sanmut opened this issue Aug 19, 2019 · 0 comments

Comments

@sanmut
Copy link
Contributor

sanmut commented Aug 19, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants