Re: [go-nuts] Digest for golang-nuts@googlegroups.com - 8 updates in 4 topics

2021-01-20 Thread 'Bryan C. Mills' via golang-nuts
50ns is approximately the cost of a cross-CPU L2 cache miss. Any time you have tight cross-CPU communication, you're going to incur that cost no matter how the communication is performed — whether it's via a sync.Mutex, a channel, or an atomic write. The way to eliminate that cost is to elimina

Re: [go-nuts] Digest for golang-nuts@googlegroups.com - 8 updates in 4 topics

2021-01-18 Thread Peter Wilson
Robert I was interested in channel peformance only because it's the 'go idiom'. Channel communication is relatively complex, and so is a useful upper limit to costs of inter-goroutine synchronisation. It's reassuring to see that 50nsec per operation is what my machinery delivers. Simpler operat

Re: [go-nuts] Digest for golang-nuts@googlegroups.com - 8 updates in 4 topics

2021-01-18 Thread Robert Engels
Channels are built with locks which without biased locking can lead to delays as routines are scheduled / blocked under -especially under contention. github.com/robaho/go-concurrency-test might illuminate some other options to try. > On Jan 18, 2021, at 8:13 PM, Pete Wilson wrote: > > No n

Re: [go-nuts] Digest for golang-nuts@googlegroups.com - 8 updates in 4 topics

2021-01-18 Thread Pete Wilson
No need to beg forgiveness. For me, the issue is the synchronisation, not how the collection is specified. You’re right; there’s no reason why a slice (or an array) couldn’t be used to define the collection. In fact, that’s the plan. But the synchronisation is still a pain. FWIW I built a channe