ethsnarks icon indicating copy to clipboard operation
ethsnarks copied to clipboard

General optimisations for libsnark

Open HarryR opened this issue 5 years ago • 1 comments

Need to verify or reflect on the following opportunities for optimisation:

  • are vtable lookups used for G1, G2 and G12 arithmetic operations? if so, can they be avoided
    • Create test executables for different cases, load in IDA, do analysis work to see if vtables are being used
  • Does rvalue usage reduce number of copy constructors, realistically, in any code that's used?
  • Can improvements for general BN256 operations be improved by using the same improvements from https://github.com/cloudflare/bn256 ?
  • Run through valgrind, cachegrind etc.
  • Use -flto and -fwhole-programwith GCC, see: https://stackoverflow.com/questions/13674894/when-to-use-certain-optimizations-such-as-fwhole-program-and-fprofile-generate - all oflibsnarkcan be built like this, butlibgmp` uses the system implementation

HarryR avatar Jul 19 '18 16:07 HarryR