nick evans dfb2b4cbc9 [ruby/securerandom] Add support for UUID version 7
Although the specification for UUIDv7 is still in draft, the UUIDv7
algorithm has been relatively stable as it progresses to completion.

Version 7 UUIDs can be very useful, because they are lexographically
sortable, which can improve e.g: database index locality.  See section
6.10 of the draft specification for further explanation:

  https://datatracker.ietf.org/doc/draft-ietf-uuidrev-rfc4122bis/

The specification allows up to 12 bits of extra timestamp precision, to
make UUID generation closer to monotonically increasing.  This provides
between 1ms and ~240ns of timestamp precision.  At the cost of some code
complexity and a small performance penalty, a kwarg may specify any
arbitrary precision between 0 and 12 extra bits.  Any stronger
guarantees of monotonicity have considerably larger tradeoffs, so
nothing more is implemented.  This limitation is documented.

Ruby issue: https://bugs.ruby-lang.org/issues/19735

https://github.com/ruby/securerandom/commit/34ed1a2ec3
2023-09-19 01:55:27 +00:00
..
2023-06-28 16:37:10 +09:00
2023-08-21 21:45:55 -07:00
2023-04-21 06:22:52 +00:00
2023-04-25 01:58:12 +00:00
2023-06-29 01:07:52 +00:00
2023-04-25 01:55:57 +00:00
2023-04-03 02:45:42 +00:00
2023-05-25 16:09:29 +09:00
2023-04-03 05:19:00 +00:00
2023-04-03 02:40:37 +00:00
2023-07-10 19:21:47 +09:00
2023-04-14 01:49:51 +00:00
2023-04-14 01:49:51 +00:00
2023-04-25 01:58:12 +00:00
2023-04-13 18:51:18 +09:00
2023-04-13 18:51:18 +09:00
2023-06-23 03:52:03 +00:00
2023-04-03 02:41:44 +00:00
2023-04-13 09:47:22 +00:00
2023-04-13 09:47:22 +00:00