Faster implementation for uuid.NewString()

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • uuid

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

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

  • uuid

    UUID generator for Go (by skeeto)

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

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

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts