3 ms·
What do you mean by "predictably unique"? Do you mean "guaranteed unique"? As a way to generate unique ids this isn't horrible. 12^62 is something like 220 bit
by aristus 18y ago
What do you mean by "predictably unique"? Do you mean "guaranteed unique"?
As a way to generate unique ids this isn't horrible. 12^62 is something like 220 bits. The odds of a collision are even lower than with a UUID.
Guaranteed uniqueness is preferred, yes. But the level of effort needed to guarantee uniqueness across a large application / dataset / etc is much higher than "unique enough", just as it's a lot more expensive to prove a number is prime than to generate a number that is 99.9999% probably prime.
- jacktang 18y agowell, even 99.9999% possible, we should handle the 0.0001% exception ;) Can I understand that, if collision occurs, let the it generate the id again?