Skip to content

Commit

Permalink
Reduce the time to run the rand benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerollmops committed Nov 25, 2024
1 parent 268d521 commit 7dbf83d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/bbbul.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,13 @@ mod tests {
let bump = bumpalo::Bump::new();
let mut bbbul = Bbbul::<BitPacker4x>::new_in(&bump);

for n in 0..10000 {
for n in 0..10_000 {
bbbul.insert(n);
}

let mut frozen = FrozenBbbul::new(bbbul);
let mut iter = frozen.iter_and_clear();
let mut expected: HashSet<u32> = (0..10000).collect();
let mut expected: HashSet<u32> = (0..10_000).collect();
while let Some(block) = iter.next_block() {
block.iter().for_each(|n| assert!(expected.remove(n)));
}
Expand All @@ -338,7 +338,7 @@ mod tests {
let mut bbbul = Bbbul::<BitPacker1x>::new_in(&bump);

let mut expected = HashSet::new();
for n in (0..10000).rev() {
for n in (0..10_000).rev() {
expected.insert(n);
bbbul.insert(n);
}
Expand All @@ -358,7 +358,7 @@ mod tests {
let mut rng = rand::rngs::StdRng::seed_from_u64(42);

let mut expected = HashSet::new();
for _ in 0..100000 {
for _ in 0..10_000 {
let n = rng.next_u32();
// Note that it is forbidden to insert the
// same number multiple times.
Expand Down

0 comments on commit 7dbf83d

Please sign in to comment.