> On 30 Jul 2023, at 13:08, Andrey M. Borodin <x4...@yandex-team.ru> wrote: > > > After discussion on GitHub with Sergey Prokhorenko [0] I understood that > counter is optional, but useful part of UUID v7. It actually promotes > sortability of data generated at high speed. > The standard does not specify how big counter should be. PFA patch with 16 > bit counter. Maybe it worth doing 18bit counter - it will save us one byte of > PRNG data. Currently we only take 2 bits out of the whole random byte. >
Here's a new patch version. Now counter is initialised with strong random on every time change (each ms). However, one first bit of the counter is preserved to zero. This is done to extend counter capacity (I left comments with reference to RFC with explanations). Thanks! Best regards, Andrey Borodin.
v4-0001-Implement-UUID-v7-as-per-IETF-draft.patch
Description: Binary data