Post
Topic
Board Development & Technical Discussion
Merits 2 from 1 user
Re: Is there a list with devices/cards and related jumps/sec for Pollard's kangaroo?
by
NotATether
on 07/07/2021, 23:09:41 UTC
⭐ Merited by ETFbitcoin (2)
Kangaroo has a built-in benchmark option in "-check" that will benchmark the number of keys/second for your hardware, but with two things to note. First, you have to pass -gpu to get benchmarks for your GPU, otherwise you'll just get CPU benchmarks. Second, this is the part of the code in Check.cpp that actually does the benchmark:

Code:
  // Check on ComputePublicKeys
  for(int i = 0; i<nbKey; i++) {
    Int rnd;
    rnd.Rand(256);
    priv.push_back(rnd);  <--- [1]
  }

  t0 = Timer::get_tick();
  for(int i = 0; i<nbKey; i++)
    pts1.push_back(secp->ComputePublicKey(&priv[i]));      <--- [2]
  t1 = Timer::get_tick();
  ::printf("ComputePublicKey %d : %.3f KKey/s\n",nbKey,(double)nbKey / ((t1 - t0)*1000.0));

  t0 = Timer::get_tick();
  pts2 = secp->ComputePublicKeys(priv);
  t1 = Timer::get_tick();
  ::printf("ComputePublicKeys %d : %.3f KKey/s\n",nbKey,(double)nbKey / ((t1 - t0)*1000.0));

To benchmark any other int operation such as add, subtract, divide or multiply, just make a duplicate this snippet at the end, but at [1] you might have to make another array of Ints for binary operations, and at [2] you gotta replace ComplutePublicKey which whatever you're trying to benchmark, such as (some int)->add(&priv).