Skip to content

Commit

Permalink
Expand benchmarks.
Browse files Browse the repository at this point in the history
  • Loading branch information
dfaranha committed Apr 25, 2024
1 parent 3f03fe9 commit c0f329e
Showing 1 changed file with 34 additions and 5 deletions.
39 changes: 34 additions & 5 deletions bench/bench_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,27 +786,27 @@ static void pdpub(void) {
BENCH_ADD(cp_lvpub_ver(r, g, r1, e));
} BENCH_END;

BENCH_RUN("cp_amore_gen (first)") {
BENCH_RUN("cp_amore_gen (1, 0, 0)") {
BENCH_ADD(cp_amore_gen(r1, r2, t, u1, u2, x, e, 1, 0, 0));
} BENCH_END;

BENCH_RUN("cp_amore_ask") {
BENCH_RUN("cp_amore_ask (0, 0)") {
g1_rand(p);
g2_rand(q);
BENCH_ADD(cp_amore_ask(v1, v2, w1, w2, r1, r2, t, p, q, u1, u2, 0, 0));
} BENCH_END;

BENCH_RUN("cp_amore_ans") {
BENCH_RUN("cp_amore_ans (0, 0)") {
g1_rand(p);
g2_rand(q);
BENCH_ADD(cp_amore_ans(g, t, v1, v2, w1, w2, 0, 0));
} BENCH_END;

BENCH_RUN("cp_amore_gen") {
BENCH_RUN("cp_amore_gen (0, 0, 0)") {
BENCH_ADD(cp_amore_gen(r1, r2, t, u1, u2, x, e, 0, 0, 0));
} BENCH_END;

BENCH_RUN("cp_amore_ver") {
BENCH_RUN("cp_amore_ver (0, 0)") {
g1_rand(p);
g2_rand(q);
pc_map(e, p, q);
Expand All @@ -815,6 +815,35 @@ static void pdpub(void) {
BENCH_ADD(cp_amore_ver(r, g, r1, e, 0, 0));
} BENCH_END;

BENCH_RUN("cp_amore_gen (1, 1, 1)") {
BENCH_ADD(cp_amore_gen(r1, r2, t, u1, u2, x, e, 1, 1, 1));
} BENCH_END;

BENCH_RUN("cp_amore_ask (1, 1)") {
g1_rand(p);
g2_rand(q);
BENCH_ADD(cp_amore_ask(v1, v2, w1, w2, r1, r2, t, p, q, u1, u2, 1, 1));
} BENCH_END;

BENCH_RUN("cp_amore_ans (1, 1)") {
g1_rand(p);
g2_rand(q);
BENCH_ADD(cp_amore_ans(g, t, v1, v2, w1, w2, 1, 1));
} BENCH_END;

BENCH_RUN("cp_amore_gen (0, 1, 1)") {
BENCH_ADD(cp_amore_gen(r1, r2, t, u1, u2, x, e, 0, 1, 1));
} BENCH_END;

BENCH_RUN("cp_amore_ver (1, 1)") {
g1_rand(p);
g2_rand(q);
pc_map(e, p, q);
cp_amore_ask(v1, v2, w1, w2, r1, r2, t, p, q, u1, u2, 1, 1);
cp_amore_ans(g, t, v1, v2, w1, w2, 1, 1);
BENCH_ADD(cp_amore_ver(r, g, r1, e, 1, 1));
} BENCH_END;

bn_free(t);
bn_free(x);
bn_free(r1);
Expand Down

0 comments on commit c0f329e

Please sign in to comment.