2019-05-05 22:47:49 +00:00
|
|
|
//! Encode and decode a list many times.
|
2019-05-05 05:32:09 +00:00
|
|
|
//!
|
|
|
|
//! Useful for `cargo flamegraph`.
|
|
|
|
|
2019-05-13 05:12:19 +00:00
|
|
|
use ssz::{Decode, Encode};
|
2019-05-05 05:32:09 +00:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let vec: Vec<u64> = vec![4242; 8196];
|
|
|
|
|
2019-05-05 22:47:49 +00:00
|
|
|
let output: Vec<Vec<u64>> = (0..40_000)
|
2019-05-05 05:32:09 +00:00
|
|
|
.map(|_| Vec::from_ssz_bytes(&vec.as_ssz_bytes()).unwrap())
|
|
|
|
.collect();
|
|
|
|
|
|
|
|
println!("{}", output.len());
|
|
|
|
}
|