google / uuid

Go package for UUIDs based on RFC 4122 and DCE 1.1: Authentication and Security Services.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[HELP] Is there any ways to improve the performance in multi-goroutine env ?

guoxiangCN opened this issue · comments

Hello, we have a scenario that needs to generate UUID quickly.
At present, its performance in multi-threaded environment is not ideal. Do you have any solutions
Here is the benchmark data:
BenchmarkUUIDSinleGoroutine-32 1000000000 0.0000038 ns/op 0 B/op 0 allocs/op
BenchmarkUUIDMultiGoroutine-32 2307704 523.6 ns/op 16 B/op 1 allocs/op

Thanks :)