On Tue, Aug 08, 2017 at 07:52:19PM -0700, Cholerae Hu wrote:

> Some of my colleagues think that, in some cases, such as approximately 
> counting the sum total of requests, we don't need to know the accurate 
> value, so we can let several goroutines to access one variable without lock 
> or atomic operation to get the highest performance, and we can ignore the 
> warning of race detector in these cases. Is that true?

Using atomic.AddInt64() won't really affect your performance.
If it will, you should probably consider switching from Go to assembly.

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