4 ms·
Imho the UUID format is a hopeless cause anyways. You don't want to waste any bits in a 128bit identifier on version metadata, UUID uses 4. With the birthday pa
by j-pb 2y ago
Imho the UUID format is a hopeless cause anyways. You don't want to waste any bits in a 128bit identifier on version metadata, UUID uses 4. With the birthday paradox that effectively decreases the collision resistance by a factor of 4. (2^64 vs. 2^62 elements for a collision probability of 0.5)
- HelloNurse 2y ago2^62 things are still a fairly large number for plausible systems.
- j-pb 2y agoNot if you want "Globally Unique Identifier"s. These have to work even when every person on earth generates a couple billion of them.
- tommiegannert 2y agoI don't follow. You (correctly) say UUID is 128 bits, but then talk about 64 bits being prone to collision.
- j-pb 2y agoUUID is 124 bits. The collision probability (via the birthday paradox) is 50% after roughly enumerating sqrt(2*2^124) elements. [1] Since sqrt(x) = x^1/2 you can say that a n bit hash/id has a collision probability of 50% after enumerating 2^((n+1)/2) elements. 2^n/2 is just the extra handwavey version of that. 1: https://stackoverflow.com/questions/62664761/probability-of-hash-collision https://stackoverflow.com/questions/62664761/probability-of-...
- tommiegannert 2y agoThanks!