3 ms·
I guess you assume to build one timeflake per ms for one year. That's about 3e13 timeflakes. Ordinary UUIDs have a collisions at the order of 1e18 hashes (cf. h
by ktpsns 6y ago
I guess you assume to build one timeflake per ms for one year. That's about 3e13 timeflakes. Ordinary UUIDs have a collisions at the order of 1e18 hashes (cf. https://en.wikipedia.org/wiki/Universally_unique_identifier#Collisions https://en.wikipedia.org/wiki/Universally_unique_identifier#...). So we are "only" 5 orders of magnitude away. For me the collision quality feels the same.
- Ellipsis753 6y agoIf you assume one per ms then timeflake and UUIDv1 both have a 0% chance of collision as they encode the timestamp. You might go above this rate some of the time though and we might as well strive for perfection. One of the nice things about UUIDs is that you can just merge data together willy-nilly without worrying about collisions - for example, if you gets bought by Google. You can't really do this with timeflake.
- phkahler 6y ago>> If you assume one per ms then timeflake and UUIDv1 both have a 0% chance of collision as they encode the timestamp. They can be generated anywhere at any time. It two machines are generating even 1 per hour, they will have collisions if their clocks are synchronized. The random bits are important.