ethsnarks
ethsnarks copied to clipboard
General optimisations for libsnark
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 of
libsnarkcan be built like this, but
libgmp` uses the system implementation