We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Running the new simple benchmark from #1 you can see that shortlivedpool heap allocates while sync.Pool doesn't.
shortlivedpool
sync.Pool
goos: darwin goarch: amd64 pkg: github.com/gallir/shortlivedpool BenchmarkSyncPoolSimple-8 300000000 5.16 ns/op 0 B/op 0 allocs/op BenchmarkShortLivedPoolSimple-8 10000000 185 ns/op 32 B/op 1 allocs/op PASS ok github.com/gallir/shortlivedpool 4.116s
Heap allocations are exactly the thing you try to avoid by using a pool so shortlivedpool heap allocating kinda defeats the purpose 😢
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Running the new simple benchmark from #1 you can see that
shortlivedpool
heap allocates whilesync.Pool
doesn't.Heap allocations are exactly the thing you try to avoid by using a pool so
shortlivedpool
heap allocating kinda defeats the purpose 😢The text was updated successfully, but these errors were encountered: