4 ms·
The string representation is for display purposes/information exchange only. I'm sure most implementations would internally store the data in a 16-byte form (eg
by zeroimpl 8y ago
The string representation is for display purposes/information exchange only. I'm sure most implementations would internally store the data in a 16-byte form (eg the C implementation uses __uint128_t), where the data is essentially a 128-bit number.
Given that, inventing a new character set seems pointless, since you'd compare the data using 128-bit binary operations already anyways (as opposed to lexicographical string comparisons). Which leads to the question - how is ULID different from UUID in practice?
- dragonwriter 8y agoThe difference is that time is at the front, so if you need to sort by milliseconds the ID was created, you can.
- Solar19 8y agoThanks, that helps. By the way, why are they time stamped at the beginning, or at all?