forked from privacy-scaling-explorations/halo2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request privacy-scaling-explorations#35 from input-output-…
…hk/features/x-lt-p-range-check2 Add benchmarks and docs for scalar_fits_in_base_range_check
- Loading branch information
Showing
6 changed files
with
113 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
max_deg,advice_columns,lookups,permutations,column_queries,point_sets,proof_size | ||
11,3,1,3,25,4,2944 |
2 changes: 2 additions & 0 deletions
2
halo2_gadgets/benches/eccops_goldenfiles/scalar-fits-in-base-range-check.csv
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
max_deg,advice_columns,lookups,permutations,column_queries,point_sets,proof_size | ||
18,2,1,2,30,4,3488 |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
mod utilities; | ||
|
||
use criterion::{criterion_group, criterion_main, Criterion}; | ||
|
||
use halo2curves::pasta::pallas; | ||
|
||
use pprof::criterion::{Output, PProfProfiler}; | ||
|
||
use halo2_gadgets::utilities::scalar_fits_in_base_range_check::test_and_bench as rc; | ||
|
||
/// Full-width scalar decomposition benchmark | ||
fn bench_scalar_fits_in_base_range_check(c: &mut Criterion) { | ||
let scalar = pallas::Scalar::zero(); | ||
let circuit = rc::RangeCheckCircuit { | ||
mode: rc::Mode::InRangeTest { | ||
high: scalar, | ||
iterations: 10, | ||
}, | ||
}; | ||
let circuit_small = rc::RangeCheckCircuit { | ||
mode: rc::Mode::InRangeTest { | ||
high: scalar, | ||
iterations: 1, | ||
}, | ||
}; | ||
|
||
let name = "scalar-fits-in-base-range-check"; | ||
|
||
utilities::circuit_to_csv::<pallas::Affine>(11, name, &[], circuit_small); | ||
utilities::bench_circuit::<pallas::Affine>(c, 11, name, &[], circuit); | ||
} | ||
|
||
#[cfg(unix)] | ||
criterion_group! { | ||
name = benches; | ||
config = Criterion::default().with_profiler(PProfProfiler::new(100, Output::Flamegraph(None))); | ||
targets = bench_scalar_fits_in_base_range_check | ||
} | ||
|
||
#[cfg(not(unix))] | ||
criterion_group!(benches, bench_scalar_fits_in_base_range_check); | ||
|
||
criterion_main!(benches); |
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