3 ms·
8 bytes will have a non-negligible (say, 1 in 1 million) chance of generating the same identifier twice even if you only generate a few million million IDs -- s
by jepler 6y ago
8 bytes will have a non-negligible (say, 1 in 1 million) chance of generating the same identifier twice even if you only generate a few million million IDs -- see https://en.wikipedia.org/wiki/Birthday_problem#Probability_table https://en.wikipedia.org/wiki/Birthday_problem#Probability_t... and look at the "16 hex digits" row. Depending on your use case, this may or may not be a problem.
- j-pb 6y agoMicrosoft research has a great blog post on this. https://devblogs.microsoft.com/oldnewthing/20160114-00/?p=92851 https://devblogs.microsoft.com/oldnewthing/20160114-00/?p=92... TLDR: It's far more likely for a UUIDv1 to be corrupted to a collision due to memory errors and bit-flips, than for two UUIDv4 to collide. TLDRTLDR: All computing is approximate at scale.