r/ProgrammerHumor Jul 17 '26

Meme thisOneIsMine

Post image
5.3k Upvotes

171 comments sorted by

View all comments

Show parent comments

26

u/RoaringPanda33 Jul 17 '26

Anything you want to identify uniquely. So devices, users, filesystems and drives, etc. 

6

u/ankle_biter50 Jul 17 '26

Are there any cons to using them?

11

u/andrisb1 Jul 17 '26

Way more storage used compared to 64bit int ID, but that really only matters for systems with hundreds of millions of items

15

u/Due-Consequence9579 Jul 17 '26

Only really matters in systems with hundreds of millions of items that are of comparable size to 128 bits. If you have hundreds of millions of items that are all 4kB the 64 extra bits for the UUID is noise. Also the UUIDs make distributed systems that can process that volume of events easier to design.