kroma-network / tachyon

Modular ZK(Zero Knowledge) backend accelerated by GPU
MIT License
7.78k stars 226 forks source link

Improve performance in polynomial multiplication by using FFT #459

Open batzor opened 3 weeks ago

batzor commented 3 weeks ago

Currently, in univariate polynomial-by-polynomial multiplication, it uses the naive approach which takes $O(n^2)$. But if we utilize FFT, it can be reduced to $O(nlogn)$ https://github.com/kroma-network/tachyon/blob/ec92fa45e4a29b552e8380e463bbd3c1144bd91b/tachyon/math/polynomials/univariate/univariate_polynomial_ops.h#L460-L462

image

Reference: https://www.cs.toronto.edu/~denisp/csc373/docs/tutorial3-adv-writeup.pdf