Skip to content

Commit

Permalink
fix: also update constraint values in the loop
Browse files Browse the repository at this point in the history
  • Loading branch information
huitseeker committed Dec 14, 2023
1 parent 5a3f9ac commit ea0d808
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 15 deletions.
39 changes: 33 additions & 6 deletions benches/compressed-snark-supernova.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,17 @@ fn bench_compressed_snark_internal_with_arity<

fn bench_one_augmented_circuit_compressed_snark(c: &mut Criterion) {
// we vary the number of constraints in the step circuit
for &num_cons_in_augmented_circuit in
[9819, 16384, 32768, 65536, 131072, 262144, 524288, 1048576].iter()
for &num_cons_in_augmented_circuit in [
NUM_CONS_VERIFIER_CIRCUIT_PRIMARY,
16384,
32768,
65536,
131072,
262144,
524288,
1048576,
]
.iter()
{
// number of constraints in the step circuit
let num_cons = num_cons_in_augmented_circuit - NUM_CONS_VERIFIER_CIRCUIT_PRIMARY;
Expand All @@ -220,8 +229,17 @@ fn bench_one_augmented_circuit_compressed_snark(c: &mut Criterion) {

fn bench_two_augmented_circuit_compressed_snark(c: &mut Criterion) {
// we vary the number of constraints in the step circuit
for &num_cons_in_augmented_circuit in
[9819, 16384, 32768, 65536, 131072, 262144, 524288, 1048576].iter()
for &num_cons_in_augmented_circuit in [
NUM_CONS_VERIFIER_CIRCUIT_PRIMARY,
16384,
32768,
65536,
131072,
262144,
524288,
1048576,
]
.iter()
{
// number of constraints in the step circuit
let num_cons = num_cons_in_augmented_circuit - NUM_CONS_VERIFIER_CIRCUIT_PRIMARY;
Expand All @@ -239,8 +257,17 @@ fn bench_two_augmented_circuit_compressed_snark(c: &mut Criterion) {

fn bench_two_augmented_circuit_compressed_snark_with_computational_commitments(c: &mut Criterion) {
// we vary the number of constraints in the step circuit
for &num_cons_in_augmented_circuit in
[9819, 16384, 32768, 65536, 131072, 262144, 524288, 1048576].iter()
for &num_cons_in_augmented_circuit in [
NUM_CONS_VERIFIER_CIRCUIT_PRIMARY,
16384,
32768,
65536,
131072,
262144,
524288,
1048576,
]
.iter()
{
// number of constraints in the step circuit
let num_cons = num_cons_in_augmented_circuit - NUM_CONS_VERIFIER_CIRCUIT_PRIMARY;
Expand Down
24 changes: 21 additions & 3 deletions benches/compressed-snark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,17 @@ fn bench_compressed_snark_internal<S1: RelaxedR1CSSNARKTrait<E1>, S2: RelaxedR1C

fn bench_compressed_snark(c: &mut Criterion) {
// we vary the number of constraints in the step circuit
for &num_cons_in_augmented_circuit in
[9819, 16384, 32768, 65536, 131072, 262144, 524288, 1048576].iter()
for &num_cons_in_augmented_circuit in [
NUM_CONS_VERIFIER_CIRCUIT_PRIMARY,
16384,
32768,
65536,
131072,
262144,
524288,
1048576,
]
.iter()
{
// number of constraints in the step circuit
let num_cons = num_cons_in_augmented_circuit - NUM_CONS_VERIFIER_CIRCUIT_PRIMARY;
Expand All @@ -151,7 +160,16 @@ fn bench_compressed_snark(c: &mut Criterion) {

fn bench_compressed_snark_with_computational_commitments(c: &mut Criterion) {
// we vary the number of constraints in the step circuit
for &num_cons_in_augmented_circuit in [9819, 16384, 32768, 65536, 131072, 262144].iter() {
for &num_cons_in_augmented_circuit in [
NUM_CONS_VERIFIER_CIRCUIT_PRIMARY,
16384,
32768,
65536,
131072,
262144,
]
.iter()
{
// number of constraints in the step circuit
let num_cons = num_cons_in_augmented_circuit - NUM_CONS_VERIFIER_CIRCUIT_PRIMARY;

Expand Down
26 changes: 22 additions & 4 deletions benches/recursive-snark-supernova.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,17 @@ fn bench_recursive_snark_internal_with_arity(

fn bench_one_augmented_circuit_recursive_snark(c: &mut Criterion) {
// we vary the number of constraints in the step circuit
for &num_cons_in_augmented_circuit in
[9819, 16384, 32768, 65536, 131072, 262144, 524288, 1048576].iter()
for &num_cons_in_augmented_circuit in [
NUM_CONS_VERIFIER_CIRCUIT_PRIMARY,
16384,
32768,
65536,
131072,
262144,
524288,
1048576,
]
.iter()
{
// number of constraints in the step circuit
let num_cons = num_cons_in_augmented_circuit - NUM_CONS_VERIFIER_CIRCUIT_PRIMARY;
Expand All @@ -204,8 +213,17 @@ fn bench_one_augmented_circuit_recursive_snark(c: &mut Criterion) {

fn bench_two_augmented_circuit_recursive_snark(c: &mut Criterion) {
// we vary the number of constraints in the step circuit
for &num_cons_in_augmented_circuit in
[9819, 16384, 32768, 65536, 131072, 262144, 524288, 1048576].iter()
for &num_cons_in_augmented_circuit in [
NUM_CONS_VERIFIER_CIRCUIT_PRIMARY,
16384,
32768,
65536,
131072,
262144,
524288,
1048576,
]
.iter()
{
// number of constraints in the step circuit
let num_cons = num_cons_in_augmented_circuit - NUM_CONS_VERIFIER_CIRCUIT_PRIMARY;
Expand Down
13 changes: 11 additions & 2 deletions benches/recursive-snark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,17 @@ const NUM_SAMPLES: usize = 10;

fn bench_recursive_snark(c: &mut Criterion) {
// we vary the number of constraints in the step circuit
for &num_cons_in_augmented_circuit in
[9819, 16384, 32768, 65536, 131072, 262144, 524288, 1048576].iter()
for &num_cons_in_augmented_circuit in [
NUM_CONS_VERIFIER_CIRCUIT_PRIMARY,
16384,
32768,
65536,
131072,
262144,
524288,
1048576,
]
.iter()
{
// number of constraints in the step circuit
let num_cons = num_cons_in_augmented_circuit - NUM_CONS_VERIFIER_CIRCUIT_PRIMARY;
Expand Down

0 comments on commit ea0d808

Please sign in to comment.