On Wed, May 3, 2017 at 3:14 PM Piotr Narewski <piotr...@gmail.com> wrote:

> Wouldn't it require me to only use slices of a fixed size?

No, the slice.Pool object has 63 sync.Pool objects:
https://github.com/cznic/internal/blob/e5e1c3e9165d0a72507c2bbb0ffac1c02b8d3f7c/slice/pool.go#L95,
ie. 63 buckets, one for each log_2(size). Get and Put work on the bucket
selected by the request size (Get) or the capacity of the slice passed
(Put).
-- 

-j

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to