|
|
|
@ -227,6 +227,15 @@ void bench_group_add_affine_var(void* arg) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void bench_group_jacobi_var(void* arg) {
|
|
|
|
|
int i;
|
|
|
|
|
bench_inv_t *data = (bench_inv_t*)arg;
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < 20000; i++) {
|
|
|
|
|
secp256k1_gej_has_quad_y_var(&data->gej_x);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void bench_ecmult_wnaf(void* arg) {
|
|
|
|
|
int i;
|
|
|
|
|
bench_inv_t *data = (bench_inv_t*)arg;
|
|
|
|
@ -354,6 +363,7 @@ int main(int argc, char **argv) {
|
|
|
|
|
if (have_flag(argc, argv, "group") || have_flag(argc, argv, "add")) run_benchmark("group_add_var", bench_group_add_var, bench_setup, NULL, &data, 10, 200000);
|
|
|
|
|
if (have_flag(argc, argv, "group") || have_flag(argc, argv, "add")) run_benchmark("group_add_affine", bench_group_add_affine, bench_setup, NULL, &data, 10, 200000);
|
|
|
|
|
if (have_flag(argc, argv, "group") || have_flag(argc, argv, "add")) run_benchmark("group_add_affine_var", bench_group_add_affine_var, bench_setup, NULL, &data, 10, 200000);
|
|
|
|
|
if (have_flag(argc, argv, "group") || have_flag(argc, argv, "jacobi")) run_benchmark("group_jacobi_var", bench_group_jacobi_var, bench_setup, NULL, &data, 10, 20000);
|
|
|
|
|
|
|
|
|
|
if (have_flag(argc, argv, "ecmult") || have_flag(argc, argv, "wnaf")) run_benchmark("wnaf_const", bench_wnaf_const, bench_setup, NULL, &data, 10, 20000);
|
|
|
|
|
if (have_flag(argc, argv, "ecmult") || have_flag(argc, argv, "wnaf")) run_benchmark("ecmult_wnaf", bench_ecmult_wnaf, bench_setup, NULL, &data, 10, 20000);
|
|
|
|
|