> This is not that. 
> My idea could maybe be restated simpler as having a huge double-linked 
> list of sync.Pool objects and using wanting to supplement it by a map 
> index, but avoiding storing pointers in the map. 
>
>
There's no such thing as a "list of sync.Pool objects" (if you refer the 
objects, not the pool(s)),
as anything you've Put into the pool should NOT be referenced, and may 
disappear anytime.

So they sould be either in your map, or in the sync.Pool.

sync.Pool is just to amortize the creation/deletion cost of objects, 
nothing more.

And just as you've found out, to avoid costly GC pointer chasing in maps, 
use a slice of your objects, and store their indices in the map.


-- 
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