Hacker News new | past | comments | ask | show | jobs | submit login

> The missing 4 bits is the version number used as a prefix to the time-hi field.

Why would you use 4 bits for a version number in something that's supposed to be unique? What is the benefit of following this specification despite such cost, versus creating 128 unique bits based on time / random generators / machine IDs yourself?




The ability to mix different types of ID in one column or one business data store.

When you start with random UUIDs, and then decide you actually wanted per-host-namespaced ones halfway through, if you have allocated zero bits for the version ID you're up the creek.

You're trading off present-day efficiency for future-day flexibility. Whether that's wise for a particular case depends on that case.


Because 124 random bits are still way enough to make collisions extremely unlikely (needs on the order of 2^62 UUIDs even with birthday paradox - good luck storing them all), yet they are still recognizable as being of that specific format.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: