zcash / pasta_curves

Rust implementation for zcash/pasta
Other
80 stars 49 forks source link

Optimize scalar multiplication with a 4-bit window #61

Open kayabaNerve opened 1 year ago

kayabaNerve commented 1 year ago

This moves from 255 doubles and 255 additions to 259 doubles and 71 additions. If doubling is twice as fast, which is roughly the case as far as I can tell, this shifts the function from executing in (255 + (255 2)) = 765 time to (259 + (71 2)) = 401 time, a 48% speedup.