Skip to content

Commit

Permalink
Merge pull request #809 from uuid-rs/feat/v7-precision
Browse files Browse the repository at this point in the history
Support higher precision, shiftable timestamps in V7 UUIDs
  • Loading branch information
KodrAus authored Feb 26, 2025
2 parents a3eaab0 + c46f4e0 commit e468f99
Show file tree
Hide file tree
Showing 2 changed files with 285 additions and 65 deletions.
7 changes: 7 additions & 0 deletions benches/v7.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ fn new_v7_context(b: &mut Bencher) {
b.iter(|| Uuid::new_v7(Timestamp::now(&ctxt)));
}

#[bench]
fn new_v7_context_additional_precision(b: &mut Bencher) {
let ctxt = ContextV7::new().with_additional_precision();

b.iter(|| Uuid::new_v7(Timestamp::now(&ctxt)));
}

#[bench]
fn v7_raw(b: &mut Bencher) {
let now = SystemTime::UNIX_EPOCH.elapsed().unwrap();
Expand Down
Loading

0 comments on commit e468f99

Please sign in to comment.