zero-chain icon indicating copy to clipboard operation
zero-chain copied to clipboard

Optimize multiexp

Open osuketh opened this issue 6 years ago • 1 comments

The multiexp function is currently based on the bellman lib. https://github.com/LayerXcom/zero-chain/blob/10c89dc993b9c94e99d6a088ac83093ecbfa4934/core/sonic/src/utils.rs#L209-L214 We might optimize it more based on zexe's one which is based on rayon and avoiding use of trait objects.

In addition, we can remove the duplicative collect(), the parameters are into iterator from vec before passed the mutiexp function. https://github.com/LayerXcom/zero-chain/blob/10c89dc993b9c94e99d6a088ac83093ecbfa4934/core/sonic/src/utils.rs#L194

osuketh avatar May 09 '19 08:05 osuketh