Update deps
This commit is contained in:
parent
39f6cf4d2e
commit
e743ec1b73
4 changed files with 151 additions and 133 deletions
48
Cargo.lock
generated
48
Cargo.lock
generated
|
|
@ -38,9 +38,9 @@ checksum = "5c2f52a0d83e309518ba7c6abc628e21b6009780d5303b1367e6779db50e96d2"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bytemuck"
|
name = "bytemuck"
|
||||||
version = "1.24.0"
|
version = "1.25.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4"
|
checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "byteorder"
|
name = "byteorder"
|
||||||
|
|
@ -133,9 +133,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "glam"
|
name = "glam"
|
||||||
version = "0.30.10"
|
version = "0.31.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "19fc433e8437a212d1b6f1e68c7824af3aed907da60afa994e7f542d18d12aa9"
|
checksum = "74a4d85559e2637d3d839438b5b3d75c31e655276f9544d72475c36b92fabbed"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "inout"
|
name = "inout"
|
||||||
|
|
@ -187,9 +187,9 @@ checksum = "c102f2e5b3db881172fe001d9956cd07aa9f8a37ed366497032e61abed01c937"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.105"
|
version = "1.0.106"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7"
|
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
@ -202,9 +202,9 @@ checksum = "5a651516ddc9168ebd67b24afd085a718be02f8858fe406591b013d101ce2f40"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.43"
|
version = "1.0.44"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a"
|
checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
|
|
@ -251,12 +251,18 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rand_xoshiro"
|
name = "rand_core"
|
||||||
version = "0.7.0"
|
version = "0.10.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f703f4665700daf5512dcca5f43afa6af89f09db47fb56be587f80636bda2d41"
|
checksum = "0c8d0fd677905edcbeedbf2edb6494d676f0e98d54d5cf9bda0b061cb8fb8aba"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rand_xoshiro"
|
||||||
|
version = "0.8.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1f0b2cc7bfeef8f0320ca45f88b00157a03c67137022d59393614352d6bf4312"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rand_core 0.9.5",
|
"rand_core 0.10.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -274,6 +280,7 @@ dependencies = [
|
||||||
"prng_mt",
|
"prng_mt",
|
||||||
"quad-rand",
|
"quad-rand",
|
||||||
"rand",
|
"rand",
|
||||||
|
"rand_core 0.10.0",
|
||||||
"rand_core 0.6.4",
|
"rand_core 0.6.4",
|
||||||
"rand_xoshiro",
|
"rand_xoshiro",
|
||||||
"romu",
|
"romu",
|
||||||
|
|
@ -288,9 +295,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "romu"
|
name = "romu"
|
||||||
version = "0.7.0"
|
version = "0.8.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bd731b0b5899480a0d7cf3b9ce744a92793c98c092f9d6f0a8133ef9fe8024b1"
|
checksum = "7eb6d76270085d48d0c65f0a78d1255905a6bbe3ff4737b7c591b12eecd87b62"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"getrandom",
|
"getrandom",
|
||||||
]
|
]
|
||||||
|
|
@ -345,9 +352,10 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "simd_rand"
|
name = "simd_rand"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/martinothamar/simd-rand.git?rev=faff5f147e2e9d57385f94a7c3f2f72ae212ab16#faff5f147e2e9d57385f94a7c3f2f72ae212ab16"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e73ec6c870b8163d07adb888cf70de0a613b76db7b0f3001165f93b1beb87c1b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rand_core 0.6.4",
|
"rand_core 0.9.5",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -435,18 +443,18 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zerocopy"
|
name = "zerocopy"
|
||||||
version = "0.8.33"
|
version = "0.8.37"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd"
|
checksum = "7456cf00f0685ad319c5b1693f291a650eaf345e941d082fc4e03df8a03996ac"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"zerocopy-derive",
|
"zerocopy-derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zerocopy-derive"
|
name = "zerocopy-derive"
|
||||||
version = "0.8.33"
|
version = "0.8.37"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1"
|
checksum = "1328722bbf2115db7e19d69ebcc15e795719e2d66b60827c6a69a117365e37a0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,11 @@ prng_mt = "0.1.0"
|
||||||
quad-rand = "0.2.3"
|
quad-rand = "0.2.3"
|
||||||
rand = "0.9.2"
|
rand = "0.9.2"
|
||||||
rand_core_06 = { package = "rand_core", version = "0.6.4" }
|
rand_core_06 = { package = "rand_core", version = "0.6.4" }
|
||||||
rand_xoshiro = "0.7.0"
|
rand_core_10 = { package = "rand_core", version = "0.10.0" }
|
||||||
romu = "0.7.0"
|
rand_xoshiro = "0.8.0"
|
||||||
|
romu = "0.8.0"
|
||||||
shishua = "0.2.0"
|
shishua = "0.2.0"
|
||||||
simd_rand = { git = "https://github.com/martinothamar/simd-rand.git", rev = "faff5f147e2e9d57385f94a7c3f2f72ae212ab16" }
|
simd_rand = { version = "0.1.0", features = ["portable"] }
|
||||||
simplerand = "1.6.0"
|
simplerand = "1.6.0"
|
||||||
tiny_prng = "0.2.5"
|
tiny_prng = "0.2.5"
|
||||||
tinyrand = "0.5.0"
|
tinyrand = "0.5.0"
|
||||||
|
|
|
||||||
130
README.md
130
README.md
|
|
@ -19,74 +19,76 @@ Inclusion criteria:
|
||||||
RUSTFLAGS='-C target-cpu=native' cargo run --release
|
RUSTFLAGS='-C target-cpu=native' cargo run --release
|
||||||
```
|
```
|
||||||
|
|
||||||
|
rustc 1.95.0-nightly (57d2fb136 2026-02-01)
|
||||||
|
|
||||||
Results on AMD Ryzen 7 5700X: (with AVX2)
|
Results on AMD Ryzen 7 5700X: (with AVX2)
|
||||||
|
|
||||||
```
|
```
|
||||||
Time (s) PRNG
|
Time (s) PRNG
|
||||||
0.06681618 frand::Rand
|
0.06720725 simd_rand::specific::avx2::xoshiro256plusplus::Xoshiro256PlusPlusX4
|
||||||
0.06935108 simd_rand::portable::xoshiro256plusplusx4::Xoshiro256PlusPlusX4
|
0.06825219 simd_rand::portable::xoshiro256plusx4::Xoshiro256PlusX4
|
||||||
0.07013825 simd_rand::specific::avx2::xoshiro256plus::Xoshiro256PlusX4
|
0.06890218 simd_rand::specific::avx2::xoshiro256plus::Xoshiro256PlusX4
|
||||||
0.070464075 simd_rand::specific::avx2::xoshiro256plusplus::Xoshiro256PlusPlusX4
|
0.069135666 simd_rand::portable::xoshiro256plusplusx4::Xoshiro256PlusPlusX4
|
||||||
0.07331398 simd_rand::portable::xoshiro256plusx8::Xoshiro256PlusX8
|
0.07073431 simd_rand::portable::xoshiro256plusx8::Xoshiro256PlusX8
|
||||||
0.07332602 simd_rand::portable::xoshiro256plusplusx8::Xoshiro256PlusPlusX8
|
0.07283282 simd_rand::portable::xoshiro256plusplusx8::Xoshiro256PlusPlusX8
|
||||||
0.07440938 simd_rand::portable::xoshiro256plusx4::Xoshiro256PlusX4
|
0.07305191 frand::Rand
|
||||||
0.077901766 fast_rands::RomuDuoJrRand
|
0.076635174 fast_rands::RomuDuoJrRand
|
||||||
0.07997875 rand_xoshiro::xoshiro256plus::Xoshiro256Plus
|
0.07750931 rand_xoshiro::xoshiro256plus::Xoshiro256Plus
|
||||||
0.08022531 wyhash::v1::traits::WyRng
|
0.0798837 wyhash::v1::traits::WyRng
|
||||||
0.08147533 romu::Rng
|
0.08170648 fast_rands::RomuTrioRand
|
||||||
0.082410775 fast_rands::RomuTrioRand
|
0.082019165 romu::Rng
|
||||||
0.08576214 rand_xoshiro::xoshiro256starstar::Xoshiro256StarStar
|
0.08613385 simd_rand::specific::avx2::shishua::Shishua<32768>
|
||||||
0.08702609 wyhash::final3::traits::WyRng
|
0.08767373 tinyrand::wyrand::Wyrand
|
||||||
0.087389685 wyrand::final_v4_2::wyrand::WyRand
|
0.08789389 wyhash::final3::traits::WyRng
|
||||||
0.08785791 tinyrand::wyrand::Wyrand
|
0.087896034 fastrand::Rng
|
||||||
0.08805069 fastrand::Rng
|
0.08798213 wyrand::final_v4_2::wyrand::WyRand
|
||||||
0.088699095 simd_rand::specific::avx2::shishua::Shishua<32768>
|
0.089724645 rand_xoshiro::xoshiro256starstar::Xoshiro256StarStar
|
||||||
0.089351326 rand_xoshiro::xoroshiro128plus::Xoroshiro128Plus
|
0.090424806 rand_xoshiro::xoroshiro128plus::Xoroshiro128Plus
|
||||||
0.090053834 fast_rands::Xoshiro256PlusPlusRand
|
0.09778529 tiny_prng::pcg::PcgXslRr6432Mcg
|
||||||
0.09293575 rand::rngs::small::SmallRng
|
0.098746814 rand_xoshiro::xoroshiro128plusplus::Xoroshiro128PlusPlus
|
||||||
0.09571917 rand_xoshiro::xoshiro256plusplus::Xoshiro256PlusPlus
|
0.10192768 rand_xoshiro::xoroshiro128starstar::Xoroshiro128StarStar
|
||||||
0.09630984 rand_xoshiro::xoshiro512plus::Xoshiro512Plus
|
0.10222766 fast_rands::Xoshiro256PlusPlusRand
|
||||||
0.09719508 tiny_prng::pcg::PcgXslRr6432Mcg
|
0.1025012 rand_xoshiro::xoshiro256plusplus::Xoshiro256PlusPlus
|
||||||
0.10209641 rand_xoshiro::xoshiro512starstar::Xoshiro512StarStar
|
0.10895407 rand::rngs::small::SmallRng
|
||||||
0.10582184 rand_xoshiro::xoroshiro128starstar::Xoroshiro128StarStar
|
0.109856725 rand_xoshiro::xoshiro512plus::Xoshiro512Plus
|
||||||
0.107617944 rand_xoshiro::xoshiro512plusplus::Xoshiro512PlusPlus
|
0.1161916 tinyrand::xorshift::Xorshift
|
||||||
0.11635949 tinyrand::xorshift::Xorshift
|
0.11952907 shishua::core::ShiShuAState
|
||||||
0.11716504 rand_xoshiro::xoroshiro128plusplus::Xoroshiro128PlusPlus
|
0.1273132 tiny_prng::pcg::PcgXslRrMcg
|
||||||
0.12221907 shishua::core::ShiShuAState
|
0.1313371 tiny_prng::xorshift::Xorshift1024star
|
||||||
0.1273574 tiny_prng::pcg::PcgXslRrMcg
|
0.13799635 tiny_prng::xorshift::Xorshift128
|
||||||
0.13119678 tiny_prng::xorshift::Xorshift1024star
|
0.1382492 rand_xoshiro::xoshiro512plusplus::Xoshiro512PlusPlus
|
||||||
0.13813396 tiny_prng::xorshift::Xorshift128
|
0.13890779 rand_xoshiro::xoshiro512starstar::Xoshiro512StarStar
|
||||||
0.14830554 rand_xoshiro::splitmix64::SplitMix64
|
0.14007749 rand_xoshiro::splitmix64::SplitMix64
|
||||||
0.1490197 fast_rands::Sfc64Rand
|
0.14576794 rand_xoshiro::xoshiro128plus::Xoshiro128Plus
|
||||||
0.15220404 tiny_prng::pcg::PcgXslRr
|
0.15051891 fast_rands::Sfc64Rand
|
||||||
0.15493397 tinyrand::splitmix::SplitMix
|
0.1522026 tiny_prng::pcg::PcgXslRr
|
||||||
0.16185075 rand_xoshiro::xoshiro128plus::Xoshiro128Plus
|
0.15726987 tinyrand::splitmix::SplitMix
|
||||||
0.17024948 bsd4random::BSD
|
0.15869391 prng_mt::mt19937::MT19937_64
|
||||||
0.17189687 prng_mt::mt19937::MT19937_64
|
0.15959476 rand_xoshiro::xoshiro128starstar::Xoshiro128StarStar
|
||||||
0.1737906 fast_rands::XorShift64Rand
|
0.1698655 bsd4random::BSD
|
||||||
0.17380002 tiny_prng::xorshift::Xorshift64
|
0.17368329 tiny_prng::xorshift::Xorshift64
|
||||||
0.17656836 fast_rands::Lehmer64Rand
|
0.17383604 rand_xoshiro::xoroshiro64star::Xoroshiro64Star
|
||||||
0.18433817 mcg59::MCG59
|
0.17391294 fast_rands::XorShift64Rand
|
||||||
0.18995807 tiny_prng::xorshift::Xorshift64star
|
0.1766414 fast_rands::Lehmer64Rand
|
||||||
0.19150706 rand_xoshiro::xoshiro128plusplus::Xoshiro128PlusPlus
|
0.17737824 tiny_prng::xorshift::Xorshift64star
|
||||||
0.19262685 rand_xoshiro::xoshiro128starstar::Xoshiro128StarStar
|
0.18385774 mcg59::MCG59
|
||||||
0.20068832 tiny_prng::mt64::Mt19937
|
0.18856412 rand_xoshiro::xoshiro128plusplus::Xoshiro128PlusPlus
|
||||||
0.2185049 aes_prng::AesRng
|
0.20034873 tiny_prng::mt64::Mt19937
|
||||||
0.23102058 rand_xoshiro::xoroshiro64star::Xoroshiro64Star
|
0.21738203 rand_xoshiro::xoroshiro64starstar::Xoroshiro64StarStar
|
||||||
0.23144223 tiny_prng::pcg::PcgXshRs6432
|
0.21857128 aes_prng::AesRng
|
||||||
0.23157886 tiny_prng::pcg::PcgXshRr6432
|
0.23149101 tiny_prng::pcg::PcgXshRs6432
|
||||||
0.25709888 rand_xoshiro::xoroshiro64starstar::Xoroshiro64StarStar
|
0.23159662 tiny_prng::pcg::PcgXshRr6432
|
||||||
0.28615955 rand::rngs::std::StdRng
|
0.28765705 rand::rngs::std::StdRng
|
||||||
0.29523018 prng_mt::mt19937::MT19937
|
0.29028276 prng_mt::mt19937::MT19937
|
||||||
0.31545836 quad_rand::RandGenerator
|
0.3162913 quad_rand::RandGenerator
|
||||||
0.34703827 tiny_prng::xorshift::Xorshift32
|
0.34691545 tiny_prng::xorshift::Xorshift32
|
||||||
0.34762907 nanorand::rand::wyrand::WyRand
|
0.34718052 nanorand::rand::wyrand::WyRand
|
||||||
0.39694864 tiny_prng::mt::Mt19937
|
0.3953146 tiny_prng::mt::Mt19937
|
||||||
0.46873802 nanorand::rand::pcg64::Pcg64
|
0.40042716 nanorand::rand::pcg64::Pcg64
|
||||||
0.8413978 nanorand::rand::chacha::ChaCha<8>
|
0.9632352 nanorand::rand::chacha::ChaCha<8>
|
||||||
1.769573 shishua::rand::ShiShuARng
|
1.772863 shishua::rand::ShiShuARng
|
||||||
3.5496118 acorn_prng::Acorn
|
3.5408454 acorn_prng::Acorn
|
||||||
3.7084286 simplerand::Random
|
3.706891 simplerand::Random
|
||||||
```
|
```
|
||||||
|
|
||||||
Results on Intel Core i5-7300HQ: (with AVX2)
|
Results on Intel Core i5-7300HQ: (with AVX2)
|
||||||
|
|
|
||||||
99
src/main.rs
99
src/main.rs
|
|
@ -117,11 +117,16 @@ fn main() {
|
||||||
#[cfg(all(target_arch = "x86_64", target_feature = "avx2"))]
|
#[cfg(all(target_arch = "x86_64", target_feature = "avx2"))]
|
||||||
{
|
{
|
||||||
bench.run_bench::<simd_rand::specific::avx2::Shishua<{simd_rand::specific::avx2::DEFAULT_BUFFER_SIZE}>>(seed_u64, &mut output_u64);
|
bench.run_bench::<simd_rand::specific::avx2::Shishua<{simd_rand::specific::avx2::DEFAULT_BUFFER_SIZE}>>(seed_u64, &mut output_u64);
|
||||||
bench.run_bench::<simd_rand::specific::avx2::Xoshiro256PlusPlusX4>(seed_u64, &mut output_u64);
|
bench.run_bench::<simd_rand::specific::avx2::Xoshiro256PlusPlusX4>(
|
||||||
|
seed_u64,
|
||||||
|
&mut output_u64,
|
||||||
|
);
|
||||||
bench.run_bench::<simd_rand::specific::avx2::Xoshiro256PlusX4>(seed_u64, &mut output_u64);
|
bench.run_bench::<simd_rand::specific::avx2::Xoshiro256PlusX4>(seed_u64, &mut output_u64);
|
||||||
}
|
}
|
||||||
|
|
||||||
bench.results.sort_by(|(_name1, time1), (_name2, time2)| time1.partial_cmp(time2).unwrap());
|
bench
|
||||||
|
.results
|
||||||
|
.sort_by(|(_name1, time1), (_name2, time2)| time1.partial_cmp(time2).unwrap());
|
||||||
|
|
||||||
println!();
|
println!();
|
||||||
println!("Time (s)\tPRNG");
|
println!("Time (s)\tPRNG");
|
||||||
|
|
@ -166,12 +171,12 @@ impl RandProvider for rand_xoshiro::SplitMix64 {
|
||||||
type Seed = [u8; 8];
|
type Seed = [u8; 8];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand_core_10::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate(&mut self, output: &mut [u8]) {
|
fn generate(&mut self, output: &mut [u8]) {
|
||||||
use rand::RngCore;
|
use rand_core_10::Rng;
|
||||||
self.fill_bytes(output);
|
self.fill_bytes(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -180,12 +185,12 @@ impl RandProvider for rand_xoshiro::Xoroshiro128Plus {
|
||||||
type Seed = [u8; 16];
|
type Seed = [u8; 16];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand_core_10::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate(&mut self, output: &mut [u8]) {
|
fn generate(&mut self, output: &mut [u8]) {
|
||||||
use rand::RngCore;
|
use rand_core_10::Rng;
|
||||||
self.fill_bytes(output);
|
self.fill_bytes(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -194,12 +199,12 @@ impl RandProvider for rand_xoshiro::Xoroshiro128PlusPlus {
|
||||||
type Seed = [u8; 16];
|
type Seed = [u8; 16];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand_core_10::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate(&mut self, output: &mut [u8]) {
|
fn generate(&mut self, output: &mut [u8]) {
|
||||||
use rand::RngCore;
|
use rand_core_10::Rng;
|
||||||
self.fill_bytes(output);
|
self.fill_bytes(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -208,12 +213,12 @@ impl RandProvider for rand_xoshiro::Xoroshiro128StarStar {
|
||||||
type Seed = [u8; 16];
|
type Seed = [u8; 16];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand_core_10::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate(&mut self, output: &mut [u8]) {
|
fn generate(&mut self, output: &mut [u8]) {
|
||||||
use rand::RngCore;
|
use rand_core_10::Rng;
|
||||||
self.fill_bytes(output);
|
self.fill_bytes(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -222,12 +227,12 @@ impl RandProvider for rand_xoshiro::Xoroshiro64Star {
|
||||||
type Seed = [u8; 8];
|
type Seed = [u8; 8];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand_core_10::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate(&mut self, output: &mut [u8]) {
|
fn generate(&mut self, output: &mut [u8]) {
|
||||||
use rand::RngCore;
|
use rand_core_10::Rng;
|
||||||
self.fill_bytes(output);
|
self.fill_bytes(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -236,12 +241,12 @@ impl RandProvider for rand_xoshiro::Xoroshiro64StarStar {
|
||||||
type Seed = [u8; 8];
|
type Seed = [u8; 8];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand_core_10::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate(&mut self, output: &mut [u8]) {
|
fn generate(&mut self, output: &mut [u8]) {
|
||||||
use rand::RngCore;
|
use rand_core_10::Rng;
|
||||||
self.fill_bytes(output);
|
self.fill_bytes(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -250,12 +255,12 @@ impl RandProvider for rand_xoshiro::Xoshiro128Plus {
|
||||||
type Seed = [u8; 16];
|
type Seed = [u8; 16];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand_core_10::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate(&mut self, output: &mut [u8]) {
|
fn generate(&mut self, output: &mut [u8]) {
|
||||||
use rand::RngCore;
|
use rand_core_10::Rng;
|
||||||
self.fill_bytes(output);
|
self.fill_bytes(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -264,12 +269,12 @@ impl RandProvider for rand_xoshiro::Xoshiro128PlusPlus {
|
||||||
type Seed = [u8; 16];
|
type Seed = [u8; 16];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand_core_10::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate(&mut self, output: &mut [u8]) {
|
fn generate(&mut self, output: &mut [u8]) {
|
||||||
use rand::RngCore;
|
use rand_core_10::Rng;
|
||||||
self.fill_bytes(output);
|
self.fill_bytes(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -278,12 +283,12 @@ impl RandProvider for rand_xoshiro::Xoshiro128StarStar {
|
||||||
type Seed = [u8; 16];
|
type Seed = [u8; 16];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand_core_10::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate(&mut self, output: &mut [u8]) {
|
fn generate(&mut self, output: &mut [u8]) {
|
||||||
use rand::RngCore;
|
use rand_core_10::Rng;
|
||||||
self.fill_bytes(output);
|
self.fill_bytes(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -292,12 +297,12 @@ impl RandProvider for rand_xoshiro::Xoshiro256Plus {
|
||||||
type Seed = [u8; 32];
|
type Seed = [u8; 32];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand_core_10::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate(&mut self, output: &mut [u8]) {
|
fn generate(&mut self, output: &mut [u8]) {
|
||||||
use rand::RngCore;
|
use rand_core_10::Rng;
|
||||||
self.fill_bytes(output);
|
self.fill_bytes(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -306,12 +311,12 @@ impl RandProvider for rand_xoshiro::Xoshiro256PlusPlus {
|
||||||
type Seed = [u8; 32];
|
type Seed = [u8; 32];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand_core_10::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate(&mut self, output: &mut [u8]) {
|
fn generate(&mut self, output: &mut [u8]) {
|
||||||
use rand::RngCore;
|
use rand_core_10::Rng;
|
||||||
self.fill_bytes(output);
|
self.fill_bytes(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -320,12 +325,12 @@ impl RandProvider for rand_xoshiro::Xoshiro256StarStar {
|
||||||
type Seed = [u8; 32];
|
type Seed = [u8; 32];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand_core_10::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate(&mut self, output: &mut [u8]) {
|
fn generate(&mut self, output: &mut [u8]) {
|
||||||
use rand::RngCore;
|
use rand_core_10::Rng;
|
||||||
self.fill_bytes(output);
|
self.fill_bytes(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -334,12 +339,12 @@ impl RandProvider for rand_xoshiro::Xoshiro512Plus {
|
||||||
type Seed = [u8; 64];
|
type Seed = [u8; 64];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand_core_10::SeedableRng;
|
||||||
Self::from_seed(rand_xoshiro::Seed512(seed))
|
Self::from_seed(rand_xoshiro::Seed512(seed))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate(&mut self, output: &mut [u8]) {
|
fn generate(&mut self, output: &mut [u8]) {
|
||||||
use rand::RngCore;
|
use rand_core_10::Rng;
|
||||||
self.fill_bytes(output);
|
self.fill_bytes(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -348,12 +353,12 @@ impl RandProvider for rand_xoshiro::Xoshiro512PlusPlus {
|
||||||
type Seed = [u8; 64];
|
type Seed = [u8; 64];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand_core_10::SeedableRng;
|
||||||
Self::from_seed(rand_xoshiro::Seed512(seed))
|
Self::from_seed(rand_xoshiro::Seed512(seed))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate(&mut self, output: &mut [u8]) {
|
fn generate(&mut self, output: &mut [u8]) {
|
||||||
use rand::RngCore;
|
use rand_core_10::Rng;
|
||||||
self.fill_bytes(output);
|
self.fill_bytes(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -362,12 +367,12 @@ impl RandProvider for rand_xoshiro::Xoshiro512StarStar {
|
||||||
type Seed = [u8; 64];
|
type Seed = [u8; 64];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand_core_10::SeedableRng;
|
||||||
Self::from_seed(rand_xoshiro::Seed512(seed))
|
Self::from_seed(rand_xoshiro::Seed512(seed))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn generate(&mut self, output: &mut [u8]) {
|
fn generate(&mut self, output: &mut [u8]) {
|
||||||
use rand::RngCore;
|
use rand_core_10::Rng;
|
||||||
self.fill_bytes(output);
|
self.fill_bytes(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -621,7 +626,7 @@ impl RandProvider for shishua::ShiShuARng {
|
||||||
type Seed = u64;
|
type Seed = u64;
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand::SeedableRng;
|
||||||
Self::seed_from_u64(seed)
|
Self::seed_from_u64(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -663,7 +668,7 @@ impl RandProvider for rand::prelude::StdRng {
|
||||||
type Seed = [u8; 32];
|
type Seed = [u8; 32];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -677,7 +682,7 @@ impl RandProvider for rand::prelude::SmallRng {
|
||||||
type Seed = [u8; 32];
|
type Seed = [u8; 32];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -691,7 +696,7 @@ impl RandProvider for aes_prng::AesRng {
|
||||||
type Seed = [u8; 16];
|
type Seed = [u8; 16];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -929,7 +934,7 @@ impl RandProvider for wyhash::WyRng {
|
||||||
type Seed = [u8; 8];
|
type Seed = [u8; 8];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -943,7 +948,7 @@ impl RandProvider for wyhash::final3::WyRng {
|
||||||
type Seed = [u8; 8];
|
type Seed = [u8; 8];
|
||||||
type Output = u8;
|
type Output = u8;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand::{SeedableRng};
|
use rand::SeedableRng;
|
||||||
Self::from_seed(seed)
|
Self::from_seed(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -971,7 +976,7 @@ impl RandProvider for simd_rand::portable::Xoshiro256PlusPlusX4 {
|
||||||
type Seed = u64;
|
type Seed = u64;
|
||||||
type Output = u64;
|
type Output = u64;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand_core_06::{SeedableRng};
|
use rand::SeedableRng;
|
||||||
Self::seed_from_u64(seed)
|
Self::seed_from_u64(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -987,7 +992,7 @@ impl RandProvider for simd_rand::portable::Xoshiro256PlusPlusX8 {
|
||||||
type Seed = u64;
|
type Seed = u64;
|
||||||
type Output = u64;
|
type Output = u64;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand_core_06::{SeedableRng};
|
use rand::SeedableRng;
|
||||||
Self::seed_from_u64(seed)
|
Self::seed_from_u64(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1003,7 +1008,7 @@ impl RandProvider for simd_rand::portable::Xoshiro256PlusX4 {
|
||||||
type Seed = u64;
|
type Seed = u64;
|
||||||
type Output = u64;
|
type Output = u64;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand_core_06::{SeedableRng};
|
use rand::SeedableRng;
|
||||||
Self::seed_from_u64(seed)
|
Self::seed_from_u64(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1019,7 +1024,7 @@ impl RandProvider for simd_rand::portable::Xoshiro256PlusX8 {
|
||||||
type Seed = u64;
|
type Seed = u64;
|
||||||
type Output = u64;
|
type Output = u64;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand_core_06::{SeedableRng};
|
use rand::SeedableRng;
|
||||||
Self::seed_from_u64(seed)
|
Self::seed_from_u64(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1032,11 +1037,13 @@ impl RandProvider for simd_rand::portable::Xoshiro256PlusX8 {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(target_arch = "x86_64", target_feature = "avx2"))]
|
#[cfg(all(target_arch = "x86_64", target_feature = "avx2"))]
|
||||||
impl RandProvider for simd_rand::specific::avx2::Shishua<{simd_rand::specific::avx2::DEFAULT_BUFFER_SIZE}> {
|
impl RandProvider
|
||||||
|
for simd_rand::specific::avx2::Shishua<{ simd_rand::specific::avx2::DEFAULT_BUFFER_SIZE }>
|
||||||
|
{
|
||||||
type Seed = u64;
|
type Seed = u64;
|
||||||
type Output = u64;
|
type Output = u64;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand_core_06::{SeedableRng};
|
use rand::SeedableRng;
|
||||||
Self::seed_from_u64(seed)
|
Self::seed_from_u64(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1053,7 +1060,7 @@ impl RandProvider for simd_rand::specific::avx2::Xoshiro256PlusPlusX4 {
|
||||||
type Seed = u64;
|
type Seed = u64;
|
||||||
type Output = u64;
|
type Output = u64;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand_core_06::{SeedableRng};
|
use rand::SeedableRng;
|
||||||
Self::seed_from_u64(seed)
|
Self::seed_from_u64(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1070,7 +1077,7 @@ impl RandProvider for simd_rand::specific::avx2::Xoshiro256PlusX4 {
|
||||||
type Seed = u64;
|
type Seed = u64;
|
||||||
type Output = u64;
|
type Output = u64;
|
||||||
fn new(seed: Self::Seed) -> Self {
|
fn new(seed: Self::Seed) -> Self {
|
||||||
use rand_core_06::{SeedableRng};
|
use rand::SeedableRng;
|
||||||
Self::seed_from_u64(seed)
|
Self::seed_from_u64(seed)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue