bench: Port bitcoin-core/secp256k1#1796 to zkp-specific code
This commit is contained in:
@@ -29,6 +29,9 @@ static void bench_bppp(void* arg, int iters) {
|
||||
int main(void) {
|
||||
bench_bppp_data data;
|
||||
int iters = get_iters(32);
|
||||
if (iters == 0) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
data.ctx = secp256k1_context_create(SECP256K1_CONTEXT_NONE);
|
||||
|
||||
|
||||
@@ -50,6 +50,9 @@ static void bench_generator_generate_blinded(void* arg, int iters) {
|
||||
int main(void) {
|
||||
bench_generator_t data;
|
||||
int iters = get_iters(20000);
|
||||
if (iters == 0) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
data.ctx = secp256k1_context_create(SECP256K1_CONTEXT_NONE);
|
||||
|
||||
|
||||
@@ -58,6 +58,9 @@ int main(void) {
|
||||
|
||||
data.min_bits = 32;
|
||||
iters = data.min_bits*get_iters(32);
|
||||
if (iters == 0) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
run_benchmark("rangeproof_verify_bit", bench_rangeproof, bench_rangeproof_setup, NULL, &data, 10, iters);
|
||||
|
||||
|
||||
@@ -69,6 +69,9 @@ int main(void) {
|
||||
size_t n_keys = 30;
|
||||
secp256k1_scalar ssub;
|
||||
int iters = get_iters(5);
|
||||
if (iters == 0) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
data.ctx = secp256k1_context_create(SECP256K1_CONTEXT_NONE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user