bench: Port bitcoin-core/secp256k1#1796 to zkp-specific code

This commit is contained in:
mllwchrry
2026-03-02 17:15:31 +02:00
parent fe48cc9fa5
commit dc0bda5731
4 changed files with 12 additions and 0 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);