You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main bottleneck of the cryptography we're using is the full-width u64 multiplication. In the case of wasm it compiles into __multi3 function that is relatively slow. One easy way to target this problem (probably not the best though) is to replace:
It may not look clear but this way we're replacing one u128 multiplication with four u64 multiplications and a couple additions.
This optimization in the fawkes-crypto leads to speeding up synchronization time by ~15 % and improves proving time a bit. Similarly, we can implement it in phase2-bn254 and it can improve proving time by ~ 13 %.
The text was updated successfully, but these errors were encountered:
AllFi
changed the title
Replace one u128 multiplication with four u64 multiplications for wasm target
Optimize full-width u64 multiplications
Jul 13, 2023
The main bottleneck of the cryptography we're using is the full-width u64 multiplication. In the case of wasm it compiles into
__multi3
function that is relatively slow. One easy way to target this problem (probably not the best though) is to replace:with
for wasm target.
It may not look clear but this way we're replacing one u128 multiplication with four u64 multiplications and a couple additions.
This optimization in the
fawkes-crypto
leads to speeding up synchronization time by ~15 % and improves proving time a bit. Similarly, we can implement it inphase2-bn254
and it can improve proving time by ~ 13 %.The text was updated successfully, but these errors were encountered: