Update rand.

This commit is contained in:
2018-11-02 09:26:47 +01:00
parent 6d63b50cb2
commit baef8ab7ee
2 changed files with 5 additions and 4 deletions

View File

@@ -7,14 +7,15 @@ extern crate bit_set;
use std::iter::FromIterator;
use criterion::Criterion;
use rand::{Rng, SeedableRng, XorShiftRng};
use rand::{Rng, SeedableRng};
use rand::rngs::SmallRng;
use bit_set::BitSet;
fn random<C: FromIterator<u64>>(n: usize) -> C {
let mut rng = XorShiftRng::from_seed([0, 1, 2, 3]);
let mut rng = SmallRng::from_seed([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);
(0..n).map(|_| rng.next_u64()).collect()
(0..n).map(|_| rng.gen::<u64>()).collect()
}
fn contains(data: &[u64]) {