7#ifndef SECP256K1_BENCH_H
8#define SECP256K1_BENCH_H
22#define FP_MULT (1000000LL)
36 x_abs = x < 0 ? -x : x;
60 for (i = 0; i <
c; ++i) {
61 buffer[--ptr] =
'0' + (y % 10);
67 buffer[--ptr] =
'0' + (y % 10);
73 printf(
"%s", &
buffer[ptr]);
81 for (i = 0; i <
count; i++) {
100 printf(
"%s: min ",
name);
125 char* env =
getenv(
"SECP256K1_BENCH_ITERS");
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
int have_flag(int argc, char **argv, char *flag)
int get_iters(int default_iters)
void print_number(const int64_t x)
static int64_t gettime_i64(void)
void run_benchmark(char *name, void(*benchmark)(void *, int), void(*setup)(void *), void(*teardown)(void *, int), void *data, int count, int iter)