Skip to content

Commit

Permalink
feat: add benchmark just executing a Triton VM program
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed Nov 29, 2023
1 parent d2acbbf commit 8301d5d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion triton-vm/benches/trace_mmr_new_peak_calculation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ criterion_main!(benches);
criterion_group! {
name = benches;
config = Criterion::default();
targets = trace_mmr_new_peak_calculation
targets = run_mmr_new_peak_calculation, trace_mmr_new_peak_calculation
}

fn run_mmr_new_peak_calculation(criterion: &mut Criterion) {
let program = example_programs::CALCULATE_NEW_MMR_PEAKS_FROM_APPEND_WITH_SAFE_LISTS.clone();

criterion.bench_function("Run finding new peaks for MMR", |bencher| {
bencher.iter(|| {
program.run([].into(), [].into()).unwrap();
});
});
}

fn trace_mmr_new_peak_calculation(criterion: &mut Criterion) {
Expand Down

0 comments on commit 8301d5d

Please sign in to comment.