MCPcopy Create free account
hub / github.com/SoftbearStudios/bitcode / random_data

Function random_data

src/benches.rs:101–104  ·  view source on GitHub ↗
(n: usize)

Source from the content-addressed store, hash-verified

99}
100
101fn random_data(n: usize) -> Vec<Data> {
102 let mut rng = ChaCha20Rng::from_seed(Default::default());
103 (0..n).map(|_| rng.gen()).collect()
104}
105
106// Use bincode fixint for benchmarks because it's faster than varint.
107fn bincode_serialize(v: &(impl Serialize + ?Sized)) -> Vec<u8> {

Callers 2

bench_dataFunction · 0.70
comparison1Function · 0.70

Calls 1

collectMethod · 0.45

Tested by

no test coverage detected