-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculate the Uniqueness #19
Comments
Hi @ekelvin! Really glad you find the library to be useful :) I had actually included a task in issue #11 to document why 6 was chosen as the default character length. But now that you mention it, I might as well add a function that returns a probability that a collision may be encountered, what you called There are two values needed to calculate this, which are:
And (source) So @ekelvin, I shall add this task to our v3 proposals (#11) and will keep this issue open until we merge to master (max. by May 14th, although it seems we might be ready to release this week 🤞 ). Cheers! |
That is fantastic :) |
It is really great to use shorter unique id, however as we all know this comes with a price.
It would be good to be able to know based on the options what is the probability to have the same id again.
This is really important as will increase easily the usage number of this library once the probability of your usage is easily known.
example for UUID V4 is: ...Thus, the probability to find a duplicate within 103 trillion version-4 UUIDs is one in a billion (ref: https://en.wikipedia.org/wiki/Universally_unique_identifier )
The text was updated successfully, but these errors were encountered: