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

Do not shrink underlying arrays on pop/clear #1

Merged
merged 1 commit into from
Mar 18, 2020
Merged

Conversation

mourner
Copy link
Owner

@mourner mourner commented Mar 18, 2020

By avoiding shrinking arrays on pop or clear, and only keeping track of the length used and overwriting values beyond, we can optimize the use case when the queue is repeatedly reused (like Flatbush mourner/flatbush#27), while not really affecting performance much for other cases.

@mourner mourner merged commit dfc69d3 into master Mar 18, 2020
@mourner mourner deleted the no-shrink branch March 18, 2020 16:28
@mourner mourner mentioned this pull request Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant