Re: [go-nuts] when to use Sync pool

2017-10-09 Thread Val
Good point, thank you Bryan. Also note that assigning a func value to p.New seems standard for the use case "if nil, then create one" (I don't know the perf implications). Cheers Val -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] when to use Sync pool

2017-10-09 Thread 'Bryan Mills' via golang-nuts
On Friday, October 6, 2017 at 5:32:06 PM UTC-4, Ian Lance Taylor wrote: > > On Fri, Oct 6, 2017 at 1:23 PM, XXX ZZZ > wrote: > > > > So we are making a platform where we have to use a TON of short lived > > structs, in order to optimize this we intend to use sync pool,

Re: [go-nuts] when to use Sync pool

2017-10-06 Thread Ian Lance Taylor
On Fri, Oct 6, 2017 at 1:23 PM, XXX ZZZ wrote: > > So we are making a platform where we have to use a TON of short lived > structs, in order to optimize this we intend to use sync pool, however on > our benchmark tests I have found that it only seems to improve