You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was thinking- couldn't Go perform pooling for byte arrays natively and implicitly? Thought I'd bring it up here if this sounds like a logical optimization the runtime could perform.
The text was updated successfully, but these errors were encountered:
It's very difficult to implement byte buffer pooling that satisfies all the needs. butebufferpool isn't a silver bullet yet.
It performs better than a dumb sync.Pool when working with variously-sized byte buffers when a small fraction of such buffers has much higher size comparing to the rest (this helps real-world apps based on fasthttp and quicktemplate).
But it still may waste a lot of memory in the case of buffers with wide-range equally distributed sizes. It is advisable to create a separate pool per each use in this case - see Pool docs for details.
I was thinking- couldn't Go perform pooling for byte arrays natively and implicitly? Thought I'd bring it up here if this sounds like a logical optimization the runtime could perform.
The text was updated successfully, but these errors were encountered: