Skip to content

Commit f44ea42

Browse files
committed
Extend generator benchmarks to include the newly added Pcg64Dxsm variant.
1 parent 6107f93 commit f44ea42

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

benches/generators.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use rand::prelude::*;
2121
use rand::rngs::adapter::ReseedingRng;
2222
use rand::rngs::{mock::StepRng, OsRng};
2323
use rand_chacha::{ChaCha12Rng, ChaCha20Core, ChaCha20Rng, ChaCha8Rng};
24-
use rand_pcg::{Pcg32, Pcg64, Pcg64Mcg};
24+
use rand_pcg::{Pcg32, Pcg64, Pcg64Mcg, Pcg64Dxsm};
2525

2626
macro_rules! gen_bytes {
2727
($fnn:ident, $gen:expr) => {
@@ -44,6 +44,7 @@ gen_bytes!(gen_bytes_step, StepRng::new(0, 1));
4444
gen_bytes!(gen_bytes_pcg32, Pcg32::from_entropy());
4545
gen_bytes!(gen_bytes_pcg64, Pcg64::from_entropy());
4646
gen_bytes!(gen_bytes_pcg64mcg, Pcg64Mcg::from_entropy());
47+
gen_bytes!(gen_bytes_pcg64dxsm, Pcg64Dxsm::from_entropy());
4748
gen_bytes!(gen_bytes_chacha8, ChaCha8Rng::from_entropy());
4849
gen_bytes!(gen_bytes_chacha12, ChaCha12Rng::from_entropy());
4950
gen_bytes!(gen_bytes_chacha20, ChaCha20Rng::from_entropy());
@@ -73,6 +74,7 @@ gen_uint!(gen_u32_step, u32, StepRng::new(0, 1));
7374
gen_uint!(gen_u32_pcg32, u32, Pcg32::from_entropy());
7475
gen_uint!(gen_u32_pcg64, u32, Pcg64::from_entropy());
7576
gen_uint!(gen_u32_pcg64mcg, u32, Pcg64Mcg::from_entropy());
77+
gen_uint!(gen_u32_pcg64dxsm, u32, Pcg64Dxsm::from_entropy());
7678
gen_uint!(gen_u32_chacha8, u32, ChaCha8Rng::from_entropy());
7779
gen_uint!(gen_u32_chacha12, u32, ChaCha12Rng::from_entropy());
7880
gen_uint!(gen_u32_chacha20, u32, ChaCha20Rng::from_entropy());
@@ -85,6 +87,7 @@ gen_uint!(gen_u64_step, u64, StepRng::new(0, 1));
8587
gen_uint!(gen_u64_pcg32, u64, Pcg32::from_entropy());
8688
gen_uint!(gen_u64_pcg64, u64, Pcg64::from_entropy());
8789
gen_uint!(gen_u64_pcg64mcg, u64, Pcg64Mcg::from_entropy());
90+
gen_uint!(gen_u64_pcg64dxsm, u64, Pcg64Dxsm::from_entropy());
8891
gen_uint!(gen_u64_chacha8, u64, ChaCha8Rng::from_entropy());
8992
gen_uint!(gen_u64_chacha12, u64, ChaCha12Rng::from_entropy());
9093
gen_uint!(gen_u64_chacha20, u64, ChaCha20Rng::from_entropy());
@@ -109,6 +112,7 @@ macro_rules! init_gen {
109112
init_gen!(init_pcg32, Pcg32);
110113
init_gen!(init_pcg64, Pcg64);
111114
init_gen!(init_pcg64mcg, Pcg64Mcg);
115+
init_gen!(init_pcg64dxsm, Pcg64Dxsm);
112116
init_gen!(init_chacha, ChaCha20Rng);
113117

114118
const RESEEDING_BYTES_LEN: usize = 1024 * 1024;

0 commit comments

Comments
 (0)