diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:59:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:59:35 +0000 |
commit | d1b2d29528b7794b41e66fc2136e395a02f8529b (patch) | |
tree | a4a17504b260206dec3cf55b2dca82929a348ac2 /vendor/fastrand/benches | |
parent | Releasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip |
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/fastrand/benches')
-rw-r--r-- | vendor/fastrand/benches/bench.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/fastrand/benches/bench.rs b/vendor/fastrand/benches/bench.rs index 4b882b74f..a940aac48 100644 --- a/vendor/fastrand/benches/bench.rs +++ b/vendor/fastrand/benches/bench.rs @@ -18,7 +18,7 @@ fn shuffle_wyhash(b: &mut Bencher) { #[bench] fn shuffle_fastrand(b: &mut Bencher) { - let rng = fastrand::Rng::new(); + let mut rng = fastrand::Rng::new(); let mut x = (0..100).collect::<Vec<usize>>(); b.iter(|| { rng.shuffle(&mut x); @@ -40,7 +40,7 @@ fn u8_wyhash(b: &mut Bencher) { #[bench] fn u8_fastrand(b: &mut Bencher) { - let rng = fastrand::Rng::new(); + let mut rng = fastrand::Rng::new(); b.iter(|| { let mut sum = 0u8; for _ in 0..10_000 { @@ -64,7 +64,7 @@ fn u32_wyhash(b: &mut Bencher) { #[bench] fn u32_fastrand(b: &mut Bencher) { - let rng = fastrand::Rng::new(); + let mut rng = fastrand::Rng::new(); b.iter(|| { let mut sum = 0u32; for _ in 0..10_000 { @@ -76,7 +76,7 @@ fn u32_fastrand(b: &mut Bencher) { #[bench] fn fill(b: &mut Bencher) { - let rng = fastrand::Rng::new(); + let mut rng = fastrand::Rng::new(); b.iter(|| { // Pick a size that isn't divisble by 8. let mut bytes = [0u8; 367]; @@ -87,7 +87,7 @@ fn fill(b: &mut Bencher) { #[bench] fn fill_naive(b: &mut Bencher) { - let rng = fastrand::Rng::new(); + let mut rng = fastrand::Rng::new(); b.iter(|| { let mut bytes = [0u8; 367]; for item in &mut bytes { |