google / uuid

Go package for UUIDs based on RFC 4122 and DCE 1.1: Authentication and Security Services.
BSD 3-Clause "New" or "Revised" License
5.24k stars 363 forks source link

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

Closed mzygQAQ closed 2 years ago

mzygQAQ commented 2 years ago

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