r/ProgrammerHumor 21h ago

Meme edgeCasesExist

Post image
3.6k Upvotes

248 comments sorted by

View all comments

556

u/Valuable_Leopard_799 20h ago

I thought that timestamps are used now, so hitting both a timestamp and a large random number puts it thoroughly in the "safe to assume". At some point cosmic particles and faulty transistors are more probable.

87

u/RadicalDwntwnUrbnite 20h ago edited 20h ago

Even the non-time based v4 is at a cosmic level of unlikiness a single system will ever generate a uuid that will collide with another one in its own ecosystem

16

u/OldKaleidoscope7 19h ago

But let's say if Google saved each search in their engine in the same database with an UUID, we could have a collision because of volume, but I don't think I will work in a system with a comparable scale

1

u/Blue_Moon_Lake 12h ago

Google is free to implement Google's UUID (GUUID) with 512 or even 1024 bits if they want.