-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
884 additions
and
738 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
// Code is considered dead unless used in all benchmark targets | ||
#![allow(dead_code)] | ||
use criterion::Criterion; | ||
// // Code is considered dead unless used in all benchmark targets | ||
// #![allow(dead_code)] | ||
// use criterion::Criterion; | ||
|
||
use crate::common::supernova::{bench::run_bench, SnarkType, S1, S2, SS1, SS2}; | ||
// use crate::common::supernova::{bench::run_bench, SnarkType, S1, S2, SS1, SS2}; | ||
|
||
// Recursive Supernova SNARK benchmarks | ||
pub fn bench_one_augmented_circuit_recursive_snark(c: &mut Criterion) { | ||
run_bench::<S1, S2>(c, "RecursiveSNARK-NIVC-1", 1, SnarkType::Recursive) | ||
} | ||
// // Recursive Supernova SNARK benchmarks | ||
// pub fn bench_one_augmented_circuit_recursive_snark(c: &mut Criterion) { | ||
// run_bench::<S1, S2>(c, "RecursiveSNARK-NIVC-1", 1, SnarkType::Recursive) | ||
// } | ||
|
||
pub fn bench_two_augmented_circuit_recursive_snark(c: &mut Criterion) { | ||
run_bench::<S1, S2>(c, "RecursiveSNARK-NIVC-2", 2, SnarkType::Recursive) | ||
} | ||
// pub fn bench_two_augmented_circuit_recursive_snark(c: &mut Criterion) { | ||
// run_bench::<S1, S2>(c, "RecursiveSNARK-NIVC-2", 2, SnarkType::Recursive) | ||
// } | ||
|
||
// Compressed Supernova SNARK benchmarks | ||
pub fn bench_one_augmented_circuit_compressed_snark(c: &mut Criterion) { | ||
run_bench::<S1, S2>(c, "CompressedSNARK-NIVC-1", 1, SnarkType::Compressed) | ||
} | ||
// // Compressed Supernova SNARK benchmarks | ||
// pub fn bench_one_augmented_circuit_compressed_snark(c: &mut Criterion) { | ||
// run_bench::<S1, S2>(c, "CompressedSNARK-NIVC-1", 1, SnarkType::Compressed) | ||
// } | ||
|
||
pub fn bench_two_augmented_circuit_compressed_snark(c: &mut Criterion) { | ||
run_bench::<S1, S2>(c, "CompressedSNARK-NIVC-2", 2, SnarkType::Compressed) | ||
} | ||
// pub fn bench_two_augmented_circuit_compressed_snark(c: &mut Criterion) { | ||
// run_bench::<S1, S2>(c, "CompressedSNARK-NIVC-2", 2, SnarkType::Compressed) | ||
// } | ||
|
||
pub fn bench_two_augmented_circuit_compressed_snark_with_computational_commitments( | ||
c: &mut Criterion, | ||
) { | ||
run_bench::<SS1, SS2>( | ||
c, | ||
"CompressedSNARK-NIVC-Commitments-2", | ||
2, | ||
SnarkType::Compressed, | ||
) | ||
} | ||
// pub fn bench_two_augmented_circuit_compressed_snark_with_computational_commitments( | ||
// c: &mut Criterion, | ||
// ) { | ||
// run_bench::<SS1, SS2>( | ||
// c, | ||
// "CompressedSNARK-NIVC-Commitments-2", | ||
// 2, | ||
// SnarkType::Compressed, | ||
// ) | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
use criterion::*; | ||
use std::time::Duration; | ||
// use criterion::*; | ||
// use std::time::Duration; | ||
|
||
mod common; | ||
use common::supernova::targets::{ | ||
bench_one_augmented_circuit_compressed_snark, bench_two_augmented_circuit_compressed_snark, | ||
bench_two_augmented_circuit_compressed_snark_with_computational_commitments, | ||
}; | ||
// mod common; | ||
// use common::supernova::targets::{ | ||
// bench_one_augmented_circuit_compressed_snark, bench_two_augmented_circuit_compressed_snark, | ||
// bench_two_augmented_circuit_compressed_snark_with_computational_commitments, | ||
// }; | ||
|
||
// To run these benchmarks, first download `criterion` with `cargo install cargo-criterion`. | ||
// Then `cargo criterion --bench compressed-snark-supernova`. The results are located in `target/criterion/data/<name-of-benchmark>`. | ||
// For flamegraphs, run `cargo criterion --bench compressed-snark-supernova --features flamegraph -- --profile-time <secs>`. | ||
// The results are located in `target/criterion/profile/<name-of-benchmark>`. | ||
cfg_if::cfg_if! { | ||
if #[cfg(feature = "flamegraph")] { | ||
criterion_group! { | ||
name = compressed_snark_supernova; | ||
config = Criterion::default().warm_up_time(Duration::from_millis(3000)).with_profiler(pprof::criterion::PProfProfiler::new(100, pprof::criterion::Output::Flamegraph(None))); | ||
targets = bench_one_augmented_circuit_compressed_snark, bench_two_augmented_circuit_compressed_snark, bench_two_augmented_circuit_compressed_snark_with_computational_commitments | ||
} | ||
} else { | ||
criterion_group! { | ||
name = compressed_snark_supernova; | ||
config = Criterion::default().warm_up_time(Duration::from_millis(3000)); | ||
targets = bench_one_augmented_circuit_compressed_snark, bench_two_augmented_circuit_compressed_snark, bench_two_augmented_circuit_compressed_snark_with_computational_commitments | ||
} | ||
} | ||
} | ||
// // To run these benchmarks, first download `criterion` with `cargo install cargo-criterion`. | ||
// // Then `cargo criterion --bench compressed-snark-supernova`. The results are located in `target/criterion/data/<name-of-benchmark>`. | ||
// // For flamegraphs, run `cargo criterion --bench compressed-snark-supernova --features flamegraph -- --profile-time <secs>`. | ||
// // The results are located in `target/criterion/profile/<name-of-benchmark>`. | ||
// cfg_if::cfg_if! { | ||
// if #[cfg(feature = "flamegraph")] { | ||
// criterion_group! { | ||
// name = compressed_snark_supernova; | ||
// config = Criterion::default().warm_up_time(Duration::from_millis(3000)).with_profiler(pprof::criterion::PProfProfiler::new(100, pprof::criterion::Output::Flamegraph(None))); | ||
// targets = bench_one_augmented_circuit_compressed_snark, bench_two_augmented_circuit_compressed_snark, bench_two_augmented_circuit_compressed_snark_with_computational_commitments | ||
// } | ||
// } else { | ||
// criterion_group! { | ||
// name = compressed_snark_supernova; | ||
// config = Criterion::default().warm_up_time(Duration::from_millis(3000)); | ||
// targets = bench_one_augmented_circuit_compressed_snark, bench_two_augmented_circuit_compressed_snark, bench_two_augmented_circuit_compressed_snark_with_computational_commitments | ||
// } | ||
// } | ||
// } | ||
|
||
criterion_main!(compressed_snark_supernova); | ||
// criterion_main!(compressed_snark_supernova); |
Oops, something went wrong.