mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-21 10:27:26 +08:00
* v2.1.0 [omit consensus and adjacent] - this commit will be amended with the full release after the file copy is complete * 2.1.0 main node rollup
26 lines
513 B
Rust
26 lines
513 B
Rust
use bulletproofs::{BulletproofGens, PedersenGens};
|
|
|
|
#[macro_use]
|
|
extern crate criterion;
|
|
use criterion::Criterion;
|
|
|
|
fn pc_gens(c: &mut Criterion) {
|
|
c.bench_function("PedersenGens::new", |b| b.iter(|| PedersenGens::default()));
|
|
}
|
|
|
|
fn bp_gens(c: &mut Criterion) {
|
|
c.bench_function_over_inputs(
|
|
"BulletproofGens::new",
|
|
|b, size| b.iter(|| BulletproofGens::new(*size, 1)),
|
|
(0..10).map(|i| 2 << i),
|
|
);
|
|
}
|
|
|
|
criterion_group! {
|
|
bp,
|
|
bp_gens,
|
|
pc_gens,
|
|
}
|
|
|
|
criterion_main!(bp);
|