-
Notifications
You must be signed in to change notification settings - Fork 169
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
Alloc count regression in #8 #14
Comments
Thanks @tbg for filing this. The
When I looked into the Lines 333 to 348 in 65a0bf3
I think at some point we'll want to find a way to avoid reallocating either of these slices per Ready iteration in the common case, but that runs into questions of ownership because the slices can be handed back to the app. Do we want to expand the library's API for this? For the non-async writes logic, we can probably do something simpler to recycle the Do you think it's worth it to go part way and shave a heap allocation off the |
No, I don't think so. Thanks for the explanation, I had forgotten about 55e6a83. |
Yeah, (as you know) these kind of ownership questions keep coming up on our side of the fence (CRDB) as well, most recently here. Maybe a model that can work is that we have a static method taking a It would also be nice to pool the |
Filed #15 for discussing the memory reuse angle. |
Looks like #8 gave us a regression in alloc count.
The text was updated successfully, but these errors were encountered: