-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf,memory: fft without precompute #472
Conversation
📦 📦 |
📦 📦 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conditional accept - I do not have enough knowledge about FFTs and twiddles to understand if done correctly. But making the computation optional seems correct.
If not urgent then I would ask @ThomasPiellard to confirm.
In short, this PR allows for
fft.NewDomain()
to have an optionfft.WithoutPrecompute()
which initializes the domain without precomputing (all) twiddles & coset tables.For large domains, this save a huge amount of memory at the cost of 20-30% CPU perf downgrade.
To simplify code, it modifies existing inner DIF and DIT fft methods to take a precomputed twiddle table and a starting stage; so twiddles can still be precomputed but we skip the first stages (each stage we skip we save domain.Cardinality / stage*2 memory).