Skip to content

Commit

Permalink
Modified bench_scalar_split so it won't get optimized out
Browse files Browse the repository at this point in the history
  • Loading branch information
elichai committed Oct 28, 2019
1 parent 73a30c6 commit 362bb25
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/bench_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ void bench_scalar_mul(void* arg) {

#ifdef USE_ENDOMORPHISM
void bench_scalar_split(void* arg) {
int i;
int i, j = 0;
bench_inv *data = (bench_inv*)arg;

for (i = 0; i < 20000; i++) {
secp256k1_scalar l, r;
secp256k1_scalar_split_lambda(&l, &r, &data->scalar_x);
secp256k1_scalar_add(&data->scalar_x, &data->scalar_x, &data->scalar_y);
secp256k1_scalar_split_lambda(&data->scalar_x, &data->scalar_y, &data->scalar_x);
j += secp256k1_scalar_add(&data->scalar_x, &data->scalar_x, &data->scalar_y);
}
CHECK(j <= 20000);
}
#endif

Expand Down

0 comments on commit 362bb25

Please sign in to comment.