Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/bench_multiset.c
Show All 20 Lines | void bench_multiset(void* arg, int iters) { | ||||
unsigned char result[32]; | unsigned char result[32]; | ||||
secp256k1_multiset multiset; | secp256k1_multiset multiset; | ||||
UNUSED(arg); | UNUSED(arg); | ||||
secp256k1_multiset_init(ctx, &multiset); | secp256k1_multiset_init(ctx, &multiset); | ||||
for (m = 0; m < iters; m++) { | for (m = 0; m < iters; m++) { | ||||
unsigned char buf[BUFSIZE]; | unsigned char buf[BUFSIZE]; | ||||
secp256k1_multiset x; | |||||
for (n = 0; n < BUFSIZE; n++) { | for (n = 0; n < BUFSIZE; n++) { | ||||
buf[n] = it++; | buf[n] = it++; | ||||
} | } | ||||
secp256k1_multiset_add(ctx, &x, buf, sizeof(buf)); | secp256k1_multiset_add(ctx, &multiset, buf, sizeof(buf)); | ||||
} | } | ||||
secp256k1_multiset_finalize(ctx, result, &multiset); | secp256k1_multiset_finalize(ctx, result, &multiset); | ||||
} | } | ||||
void bench_multiset_setup(void* arg) { | void bench_multiset_setup(void* arg) { | ||||
UNUSED(arg); | UNUSED(arg); | ||||
} | } | ||||
Show All 10 Lines |