From db0eac488449f26431d075af9b74837dc9fa63c1 Mon Sep 17 00:00:00 2001 From: Arthur Silva Date: Mon, 23 Nov 2026 10:41:44 +0100 Subject: [PATCH 1/2] Upgrade dev dependencies --- Cargo.toml | 8 ++++---- benches/benchmarks.rs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a2c914a..8baa957 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,12 +27,12 @@ equivalent = "1.0" foldhash = { optional = true, version = "0.2" } hashbrown = { version = "0.17", default-features = false, features = ["inline-more"] } parking_lot = { optional = true, version = "0.13" } -shuttle = { version = "0.8", optional = true } +shuttle = { version = "0.9", optional = true } [dev-dependencies] -criterion = "0.7" -rand = { version = "0.9", features = ["small_rng"] } -rand_distr = "0.5" +criterion = "0.8" +rand = "0.10" +rand_distr = "0.6" tokio = { version = "1", features = ["full"] } [[bench]] diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs index 7c4f1b2..6b9ecde 100644 --- a/benches/benchmarks.rs +++ b/benches/benchmarks.rs @@ -1,6 +1,6 @@ use criterion::{criterion_group, criterion_main, Criterion}; use quick_cache::sync::Cache; -use rand::prelude::*; +use rand::{prelude::*, rngs::Xoshiro256PlusPlus}; use rand_distr::Zipf; pub fn r_benchmark(c: &mut Criterion) { @@ -12,7 +12,7 @@ pub fn r_benchmark(c: &mut Criterion) { g.bench_function(format!("qc {}", population), |b| { let cache = Cache::new(population); let mut samples = (0usize..population).collect::>(); - let mut rng = SmallRng::seed_from_u64(1); + let mut rng = Xoshiro256PlusPlus::seed_from_u64(1); samples.shuffle(&mut rng); samples.truncate((population as f64 * s) as usize); for p in samples { @@ -43,7 +43,7 @@ pub fn rw_benchmark(c: &mut Criterion) { let mut misses = 0u64; b.iter_batched_ref( || { - let mut rng = SmallRng::seed_from_u64(1); + let mut rng = Xoshiro256PlusPlus::seed_from_u64(1); let dist = Zipf::new(population, s).unwrap(); let cache = Cache::new(capacity); for _ in 0..population as usize * 3 { From a57bb0d830cea3fb4f1f9910b21efa3bced8a6dd Mon Sep 17 00:00:00 2001 From: Arthur Silva Date: Mon, 23 Nov 2026 10:49:44 +0100 Subject: [PATCH 2/2] Keep SmallRng with rand 0.10 --- benches/benchmarks.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs index 6b9ecde..7c4f1b2 100644 --- a/benches/benchmarks.rs +++ b/benches/benchmarks.rs @@ -1,6 +1,6 @@ use criterion::{criterion_group, criterion_main, Criterion}; use quick_cache::sync::Cache; -use rand::{prelude::*, rngs::Xoshiro256PlusPlus}; +use rand::prelude::*; use rand_distr::Zipf; pub fn r_benchmark(c: &mut Criterion) { @@ -12,7 +12,7 @@ pub fn r_benchmark(c: &mut Criterion) { g.bench_function(format!("qc {}", population), |b| { let cache = Cache::new(population); let mut samples = (0usize..population).collect::>(); - let mut rng = Xoshiro256PlusPlus::seed_from_u64(1); + let mut rng = SmallRng::seed_from_u64(1); samples.shuffle(&mut rng); samples.truncate((population as f64 * s) as usize); for p in samples { @@ -43,7 +43,7 @@ pub fn rw_benchmark(c: &mut Criterion) { let mut misses = 0u64; b.iter_batched_ref( || { - let mut rng = Xoshiro256PlusPlus::seed_from_u64(1); + let mut rng = SmallRng::seed_from_u64(1); let dist = Zipf::new(population, s).unwrap(); let cache = Cache::new(capacity); for _ in 0..population as usize * 3 {