ZenGo-X / class

Rust library for building IQC: cryptography based on class groups of imaginary quadratic orders
GNU General Public License v3.0
63 stars 31 forks source link

benchmarks for VDF #29

Open omershlo opened 4 years ago

omershlo commented 4 years ago

add benchmarks for different parameters and measure the absolute and relative times of Eval and Verify

If possible, compare it to: https://github.com/harmony-one/vdf https://github.com/poanetwork/vdf

jon-chuang commented 4 years ago

How performant does one expect the library to be compared to, say Sundersoft, which won the Chia networks competition?

omershlo commented 4 years ago

This is a good question! 1) The foundations of this library are built using Pari which is optimised c code for class group operations 2) However, I suspect that our translation from/to Pari to/from our GMP bigint is not so efficient. 3) BigInt operations are suppose to be reasonably efficient.

Overall I would assume the code will be slower than Sundersoft, but : 1) probably within same order of magnitude 2) specifically for VDF, the gap quality between generating and solving will be the similar 3) There is a LOT of room for improvement in this library

HAOYUatHZ commented 4 years ago

This is a good question!

  1. The foundations of this library are built using Pari which is optimised c code for class group operations
  2. However, I suspect that our translation from/to Pari to/from our GMP bigint is not so efficient.
  3. BigInt operations are suppose to be reasonably efficient.

Overall I would assume the code will be slower than Sundersoft, but :

  1. probably within same order of magnitude
  2. specifically for VDF, the gap quality between generating and solving will be the similar
  3. There is a LOT of room for improvement in this library

poanetwork also has this discussion: https://github.com/poanetwork/vdf/issues/13

MPIR may be a better choice over GMP & Pari