3 ms·
It generates entropy 4kb-at-a-time (instead of on each call), and uses a cache-pool instead of single cache behind a lock (which is what standard uuid does in "
by sdrapkin 1y ago
It generates entropy 4kb-at-a-time (instead of on each call), and uses a cache-pool instead of single cache behind a lock (which is what standard uuid does in "RandPool=ON" mode).
- cyberax 1y agoSo this automatically makes it unsafe in case of VM snapshots. The Linux kernel now has an optimization that makes it safe: https://lwn.net/Articles/983186/ https://lwn.net/Articles/983186/ Go should automatically benefit from this, if they use the vDSO getrandom().
- maxmcd 1y agoAh cool, the note here is also interesting: https://pkg.go.dev/github.com/google/uuid#EnableRandPool https://pkg.go.dev/github.com/google/uuid#EnableRandPool