mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-04 23:03:08 +00:00
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:
parent
de0b382fb6
commit
949fb879cc
@ -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> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user