Skip to content

Commit

Permalink
chore: update rand to 0.9.0 (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
rinde authored Jan 31, 2025
1 parent a9ace93 commit e20c659
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 20 deletions.
60 changes: 47 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ indexmap = { version = "2.7.1" }
itertools = "0.14.0"
maplit = { version = "1.0.2" }
more_collections = { path = ".", features = ["all"] }
rand = "0.8.5"
rand = "0.9.0"
serde_json = "1.0"

[[bench]]
Expand Down
15 changes: 9 additions & 6 deletions benches/vec_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ use criterion::Criterion;
use indexmap::IndexMap;
use itertools::Itertools;
use more_collections::VecMap;
use rand::distributions::Distribution;
use rand::distributions::Uniform;
use rand::thread_rng;
use rand::distr::Distribution;
use rand::distr::Uniform;
use rand::rng;

fn benchmark_insert(c: &mut Criterion) {
let mut group = c.benchmark_group("insert");
Expand Down Expand Up @@ -256,7 +256,8 @@ fn test_cases() -> [TestCase; 5] {
TestCase {
name: "big_sparse",
data: Uniform::new(0, 10_000)
.sample_iter(thread_rng())
.unwrap()
.sample_iter(rng())
.unique()
.take(50)
.map(|i| (i, "hello".to_string()))
Expand All @@ -265,7 +266,8 @@ fn test_cases() -> [TestCase; 5] {
TestCase {
name: "big_dense",
data: Uniform::new(0, 10_000)
.sample_iter(thread_rng())
.unwrap()
.sample_iter(rng())
.unique()
.take(9800)
.map(|i| (i, "hello".to_string()))
Expand Down Expand Up @@ -307,7 +309,8 @@ fn benchmark_iter(c: &mut Criterion) {

let case = Case {
data: Uniform::new(0, 10_000)
.sample_iter(thread_rng())
.unwrap()
.sample_iter(rng())
.unique()
.take(9800)
.map(|i| (i, ()))
Expand Down

0 comments on commit e20c659

Please sign in to comment.