3 ms·
You don't rewrite your whole program to use pooled allocations. Just the parts of your program where allocation performance needs to be improved. If part of y
by tossaway32 5y ago
You don't rewrite your whole program to use pooled allocations.
Just the parts of your program where allocation performance needs to be improved.
If part of your program is doing many allocations, and it's too slow, use a simple pool. Go makes pooled allocation easy and safe.
I have written huge Go programs (e.g., https://NN-512.com https://NN-512.com), and the garbage collector is not a problem. Quite the opposite, it's a major, major benefit.
Pooled allocations are rarely needed.