Hardcode a B3 constant to avoid computing it over and over
Perform inplace operations in add and square
Note: we're eventually going to have precompiles for those. But in the meantime we can already have reduced proving costs. And when we have those precompiles available, we will be able to see the gain diff wrt the current optimizations.
In my experiments, these changes cause a drop of ~937k cycles for the ratcheting program.
B3
constant to avoid computing it over and overadd
andsquare
Note: we're eventually going to have precompiles for those. But in the meantime we can already have reduced proving costs. And when we have those precompiles available, we will be able to see the gain diff wrt the current optimizations.
In my experiments, these changes cause a drop of ~937k cycles for the ratcheting program.