Skip to content

Commit

Permalink
Merge pull request #338 from brave/ppoprf-bench
Browse files Browse the repository at this point in the history
ppoprf: Use a fixed server and point for eval benchmarks
  • Loading branch information
rillian authored Nov 21, 2023
2 parents 184d3ee + cc64d49 commit bdbc76f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ppoprf/benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,17 @@ fn benchmark_server(c: &mut Criterion) {
});

c.bench_function("Server eval", |b| {
let server = Server::new(mds.clone()).unwrap();
let point = Point::from(RistrettoPoint::random(&mut OsRng));
b.iter(|| {
let server = Server::new(mds.clone()).unwrap();
let point = Point::from(RistrettoPoint::random(&mut OsRng));
server.eval(&point, 0, false).unwrap();
})
});

c.bench_function("Server verifiable eval", |b| {
let server = Server::new(mds.clone()).unwrap();
let point = Point::from(RistrettoPoint::random(&mut OsRng));
b.iter(|| {
let server = Server::new(mds.clone()).unwrap();
let point = Point::from(RistrettoPoint::random(&mut OsRng));
server.eval(&point, 0, true).unwrap();
})
});
Expand Down

0 comments on commit bdbc76f

Please sign in to comment.