message: Add schnorr sign benchmark
  Summary:
  As per title.
  Depends on D2747.
  Test Plan: ./bench_sign
  Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix, Fabien, jasonbcox
  Subscribers: jasonbcox, Fabien, schancel
diff: #include "util.h"
  #include "bench.h"
  +#ifdef ENABLE_MODULE_SCHNORR
  +#include "include/secp256k1_schnorr.h"
  +#endif
  +
  +
  typedef struct {
  secp256k1_context* ctx;
  unsigned char msg[32];
  @@ -44,12 +49,31 @@ static void bench_sign_run(void* arg) {
  }
  }
  +#ifdef ENABLE_MODULE_SCHNORR
  +static void bench_schnorr_sign_run(void* arg) {
  + int i,j;
  + bench_sign *data = (bench_sign*)arg;
  +
  + unsigned char sig[64];
  + for (i = 0; i < 20000; i++) {
  + CHECK(secp256k1_schnorr_sign(data->ctx, sig, data->msg, data->key, NULL, NULL));
  + for (j = 0; j < 32; j++) {
  + data->msg[j] = sig[j];
  + data->key[j] = sig[j + 32];
  + }
  + }
  +}
  +#endif
  +
  int main(void) {
  bench_sign data;
  data.ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN);
  run_benchmark("ecdsa_sign", bench_sign_run, bench_sign_setup, NULL, &data, 10, 20000);
  +#ifdef ENABLE_MODULE_SCHNORR
  + run_benchmark("schnorr_sign", bench_schnorr_sign_run, bench_sign_setup, NULL, &data, 10, 20000);
  +#endif
  secp256k1_context_destroy(data.ctx);
  return 0;
  