Skip to content
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

[Question] Comparison with UUID #6

Closed
egeozcan opened this issue Aug 8, 2017 · 3 comments
Closed

[Question] Comparison with UUID #6

egeozcan opened this issue Aug 8, 2017 · 3 comments

Comments

@egeozcan
Copy link

egeozcan commented Aug 8, 2017

Do you have a comparison with UUID on likelihood of collisions? For example, I've read on Wikipedia that for UUIDs that is "50% probability of at least one collision when generating 1 billion UUIDs per second for about 85 years". Does nanoid have such claims?

@ai
Copy link
Owner

ai commented Aug 8, 2017

@egeozcan nanoid is like UUID v4, just use a-zA-Z0-9~_ instead of 0-9a-f alphabet.

So nanoid will have same “50% probability of at least one collision when generating 1 billion UUIDs per second for about 85 years”.

@ai
Copy link
Owner

ai commented Aug 8, 2017

If you want to reduce collision probability (1 billion IDs per second is a huge), you can just increase ID length.

@ai
Copy link
Owner

ai commented Aug 8, 2017

I added question to docs c9c4e10

@ai ai closed this as completed Aug 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants