Switched over from OsRng --> thread_rng

- At least on my Linux machine, a signiciant amount of time (> 50%) was spent inside
  OsRng.
- Likely due to blocking behaviour of the rng devices on Linux.
- thread_rng should not block, but at the same time should provide good
  enough rng.
This commit is contained in:
BGluth 2021-05-14 20:15:03 -06:00
parent de0b382fb6
commit 949fb879cc

View File

@ -267,7 +267,7 @@ pub trait Field:
}
fn rand() -> Self {
Self::rand_from_rng(&mut OsRng)
Self::rand_from_rng(&mut rand::thread_rng())
}
fn rand_vec(n: usize) -> Vec<Self> {