7eb82125ef
* Change into_iter to iter * Fix clippy 'easy' warnings * Clippy eth2/utils * Add struct NetworkInfo * Clippy for types, utils, and beacon_node/store/src/iters.rs * Cargo fmt * Change foo to my_foo * Remove complex signature * suppress clippy warning for unit_value in benches * Use enumerate instead of iterating over range * Allow trivially_copy_pass_by_ref in serde_utils
16 lines
333 B
Rust
16 lines
333 B
Rust
//! Encode and decode a list many times.
|
|
//!
|
|
//! Useful for `cargo flamegraph`.
|
|
|
|
use ssz::{Decode, Encode};
|
|
|
|
fn main() {
|
|
let vec: Vec<u64> = vec![4242; 8196];
|
|
|
|
let output: Vec<Vec<u64>> = (0..40_000)
|
|
.map(|_| Vec::from_ssz_bytes(&vec.as_ssz_bytes()).unwrap())
|
|
.collect();
|
|
|
|
println!("{}", output.len());
|
|
}
|