Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
gopkg.in/thejerf/gomempool.v1
A []byte pool implementation for Go.
Go network programs can get into a bit of garbage collection trouble if they are constantly allocating buffers of []byte to process network requests. This library gives you an interface you can program to to easily re-use []bytes without too much additional work. It also provides statistics so you can query how well the Pool is working for you.
This is fully covered with godoc, including examples, motivation, and everything else you might otherwise expect from a README.md on GitHub. (DRY.)
This is currently at version 1.0.0, and can imported via gopkg.in/thejerf/gomempool.v1 if you like. Semantic versioning will be used for version numbers.
Starting with commit ff6f742, I will be signing this repository with the "jerf" keybase account.
"What about sync.Pool?" sync.Pool turns out to solve a different problem. sync.Pool focuses on having a pool of otherwise indistinguishable objects. gomempool specifically focuses on []bytes of potentially different sizes. After some analysis, I don't see a reason to even use sync.Pool, because there's not much it could improve in gomempool. gomempool and sync.Pool turn out not to overlap at all.
(Also I've at least picked up rumors that the core devs have been underwhelmed by sync.Pool. gomempool solves a real, if obscure, problem. You probably don't need gomempool, but there are real problems it solves.)
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.