3 ms·
This is similar to Go’s sync.Pool to reuse buffers and prevent allocations when you want to optimize things, right?
by titaniczero 4y ago
This is similar to Go’s sync.Pool to reuse buffers and prevent allocations when you want to optimize things, right?
- bombela 4y agoYes, this is similar. In Rust you control yourself the allocation on the stack or the heap. So before reaching out to a memory pool/arena, it's too tempting trying to put everything on the stack for "maximum performance".