Our great sponsors
-
uuid
Go package for UUIDs based on RFC 4122 and DCE 1.1: Authentication and Security Services. (by google)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
We are using https://github.com/google/uuid and its method: uuid.NewString(). During our profiling we have found this method to be one of the most expensive calls in our system. Even larger than some of our json.Marshal/UnMarshal code.
It's slow in large part because it does makes a system call per UUID unless you enable the pool (uuid.EnableRandPool()). However, even then its hex encoding isn't written for speed. I ended up writing my own that's about 50x faster: nullprogram.com/x/uuid.