uuidv7-library-test / README.md
tensorust-studio's picture
Move from Fungle to the Tensorust org
6938b37 verified
|
Raw History Blame Contribute Delete
3.77 kB
metadata
license: cc-by-4.0
pretty_name: 'UUIDv7 library test: order and timestamps in 10 libraries'
language:
  - en
tags:
  - uuid
  - uuidv7
  - rfc9562
  - benchmark
  - rust
  - python
  - javascript
  - go
  - dotnet
  - tensorust
size_categories:
  - 1K<n<10K
task_categories:
  - tabular-classification
configs:
  - config_name: default
    data_files:
      - split: train
        path: data.csv

UUIDv7 library test: order and timestamps in 10 libraries

Raw results from our test of 10 popular UUIDv7 libraries across Rust, Python, JavaScript, Go and .NET: does each one keep IDs in order, and does the embedded timestamp stay true, both in a tight loop and after the clock steps back an hour. Tested 2026-10-23. 1,489 rows: the tight-loop result for all 10 libraries, 27 clock-jump runs and 3 healthy-clock uuid6 runs, sampled every 2.5 simulated seconds.

Libraries: Rust uuid 1.29.0 and uuid7 1.8.0; Python standard library uuid.uuid7() (CPython 3.15.1), uuid6 2025.0.1, uuid7 0.1.0, uuid-utils 1.1.0; JavaScript uuid 14.0.3 and uuidv7 1.2.1; Go google/uuid 1.6.0; .NET Guid.CreateVersion7() (.NET 10.0.13).

How it was collected

  • Machine: Intel i7-13700KF, 32 GB, Windows 11, one thread.
  • tight_loop_1M: one thread makes 1,000,000 IDs as fast as the library allows, reading the wall clock every 10,000 IDs. We count IDs that sort at or below the one made just before them (byte order, as a database index sees them), duplicates, and how far the embedded timestamp drifts from the real clock.
  • clock_jump_back_1h: a fake clock is injected into each real library (Python time.time_ns, JavaScript Date.now, Go's internal timeNow hook via one added line in a vendored copy, the explicit-timestamp APIs in Rust and .NET). It runs normally for 1 second, steps back 3,600,000 ms, then runs 120 more simulated seconds, at 1, 2 and 10 IDs per millisecond. lag_ms = embedded timestamp minus the clock.
  • healthy_clock_60s: the same simulation for uuid6 with no clock jump.
  • Note: the CSV on tensorust.com starts with two # comment lines holding the notes above; this copy drops them so the file loads as a plain table. The rows are unchanged.

Columns

section (test name), impl, language, package, version, call, reach (downloads or importers when tested), counter_bits, fresh_random_bits, ids_per_sec, out_of_order, out_of_order_pct, duplicates, max_ids_in_one_ms, ts_ahead_of_clock_ms_after_1M, max_ts_ahead_ms, mean_bits_changed_same_ms, clock_jump_behavior (tight-loop rows); load_ids_per_ms, sim_ms, lag_ms, out_of_order_total (clock rows). Columns that do not apply to a section are blank.

Source and updates

Full write-up, findings and caveats: https://tensorust.com/articles/uuidv7-libraries-tested/ . Original CSV: https://tensorust.com/articles/uuidv7-libraries-tested/data.csv . All our methods: https://tensorust.com/methods/ .

Limits

One machine, one thread. Multi-process generators were not tested. The clock jump is simulated inside the real library code, not by changing the system clock. RFC 9562 permits all of these behaviors; "fails" in the article means "does not give you what UUIDv7 posts promise", not "violates the spec".

How to cite

Tensorust Research (2026). UUIDv7 library test: 10 libraries tested for order and true timestamps. https://tensorust.com/articles/uuidv7-libraries-tested/

@misc{tensorust2026uuidv7,
  author       = {{Tensorust Research}},
  title        = {UUIDv7 library test: 10 libraries tested for order and true timestamps},
  year         = {2026},
  howpublished = {\url{https://tensorust.com/articles/uuidv7-libraries-tested/}},
  note         = {CC BY 4.0}
}