-
Notifications
You must be signed in to change notification settings - Fork 60
v3: minimize allocations #283
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Right now output is different (with 15 allocs):
Here are all allocations:
We create pointers to the
We allocate memory for the
Creating a pointer to a
Some other allocations happens inside of
Rest of the allocations (4) I could not find, perhaps they are somewhere deep inside of the |
You could also try to run test with memory profiler. See |
Updated list of all 15 allocations:
Some other allocations happens inside of
15 allocations total. |
It does not look like a per request allocations. But let stop here. Thank you! |
I also want to note that msgpack supports zero resource allocation with sync.Pool, I think you can try using this implementation for decoding code from msgpack
|
Now we do a lot of allocations per a request:
There is no need for
0
, but with 80-20 rule we could have a soft goal8
allocs per a request.The text was updated successfully, but these errors were encountered: