Skip to content

Commit a260f2c

Browse files
committed
Improve SmallRng advise
1 parent 02aafbd commit a260f2c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/rngs/small.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ type Rng = super::xoshiro128plusplus::Xoshiro128PlusPlus;
1919
///
2020
/// `SmallRng` may be a good choice when a PRNG with small state, cheap
2121
/// initialization, good statistical quality and good performance are required.
22-
/// Note that depending on the application, [`StdRng`] is faster on many modern
23-
/// platforms while providing higher-quality randomness. Furthermore, `SmallRng`
24-
/// is **not** a good choice when:
25-
/// - Security against prediction or reproducibility are important.
26-
/// Use [`StdRng`] instead.
22+
/// Note that depending on the application, [`StdRng`] may be faster on many
23+
/// modern platforms while providing higher-quality randomness. Furthermore,
24+
/// `SmallRng` is **not** a good choice when:
25+
/// - Security against prediction is important. Use [`StdRng`] instead.
2726
/// - Seeds with many zeros are provided. In such cases, it takes `SmallRng`
2827
/// about 10 samples to produce 0 and 1 bits with equal probability. Either
2928
/// provide seeds with an approximately equal number of 0 and 1 (for example

0 commit comments

Comments
 (0)