Skip to content

Commit

Permalink
Using VidpfInput.
Browse files Browse the repository at this point in the history
  • Loading branch information
armfazh committed Feb 27, 2024
1 parent acf3c68 commit 0b3fe66
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 94 deletions.
6 changes: 3 additions & 3 deletions benches/speed_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ fn poplar1_generate_zipf_distributed_batch(
/// Benchmark VIDPF performance.
#[cfg(feature = "experimental")]
fn vidpf(c: &mut Criterion) {
use prio::vidpf::{new, Weight};
use prio::vidpf::{new, VidpfInput, Weight};

let test_sizes = [8usize, 8 * 16, 8 * 256];

Expand All @@ -876,7 +876,7 @@ fn vidpf(c: &mut Criterion) {
group.throughput(Throughput::Bytes(*size as u64 / 8));
group.bench_with_input(BenchmarkId::from_parameter(size), size, |b, &size| {
let bits = iter::repeat_with(random).take(size).collect::<Vec<bool>>();
let alpha = IdpfInput::from_bools(&bits).to_bytes();
let alpha = VidpfInput::from_bools(&bits);
let beta = Weight([Field255::one(), Field255::one()]);
let vidpf = new::<Weight<Field255, 2>>(b"binder".to_vec());
let parameter = &();
Expand All @@ -893,7 +893,7 @@ fn vidpf(c: &mut Criterion) {
group.throughput(Throughput::Bytes(*size as u64 / 8));
group.bench_with_input(BenchmarkId::from_parameter(size), size, |b, &size| {
let bits = iter::repeat_with(random).take(size).collect::<Vec<bool>>();
let alpha = IdpfInput::from_bools(&bits).to_bytes();
let alpha = VidpfInput::from_bools(&bits);
let beta = Weight([Field255::one(), Field255::one()]);
let vidpf = new::<Weight<Field255, 2>>(b"binder".to_vec());
let parameter = &();
Expand Down
Loading

0 comments on commit 0b3fe66

Please sign in to comment.