Use atomic.AddUint64 instead of mutex lock to inc count field. Bench result: benchmark old ns/op new ns/op delta BenchmarkNext-4 163 26.3 -83.87%
Perviously, we only use 8bits from member identification in id generation. The conflict rate is A(256,3)/256^3, which is around 1%. Now we use 16bites to reduce the rate to 0.005%. We can attach the full member id into id generation if needed...
Build tags are not compatible with block comments. Also adds copyright header to a few places it was missing.