fn smt_insert_empty(b: &mut Bencher<'_>) {
    let depth = models::params::account_tree_depth();

    // Create an empty SMT and one account in setup.
    let tree = RealSMT::new(depth);
    let account = gen_account(0);

    let setup = || (tree.clone(), account.clone());

    b.iter_batched(
        setup,
        |(mut tree, account)| {
            let id = 0;
            tree.insert(black_box(id), account);
        },
        BatchSize::SmallInput,
    );
}
/// Measures the time of insertion into an empty SMT.
Measures the time of insertion into an empty SMT.
Measures the time of insertion into an empty SMT .
fn smt_insert_empty(b: &mut Bencher<'_>) {
    let depth = models::params::account_tree_depth();
    // Create an empty SMT and one account in setup.
    let tree = RealSMT::new(depth);
    let account = gen_account(0);
    let setup = || (tree.clone(), account.clone());
    b.iter_batched(
        setup,
        |(mut tree, account)| {
            let id = 0;
            tree.insert(black_box(id), account);
        },
        BatchSize::SmallInput,
    );
}
fn smt_insert_empty ( b : & mut Bencher < ' _ > ) { let depth = models :: params :: account_tree_depth ( ) ; // Create an empty SMT and one account in setup. let tree = RealSMT :: new ( depth ) ; let account = gen_account ( 0 ) ; let setup = | | ( tree . clone ( ) , account . clone ( ) ) ; b . iter_batched ( setup , | ( mut tree , account ) | { let id = 0 ; tree . insert ( black_box ( id ) , account ) ; } , BatchSize :: SmallInput , ) ; }
Measures the time of insertion into an empty SMT.
Measures the time of insertion into an empty SMT .
b
&mut Bencher<'_>