Skip to content
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

prod implementation #47

Open
jonathf opened this issue May 5, 2020 · 2 comments
Open

prod implementation #47

jonathf opened this issue May 5, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@jonathf
Copy link
Owner

jonathf commented May 5, 2020

Current implementation uses multiply repeatedly along axis. This can likely be
done much more efficiently with dedicated code.

Somewhat the same problem as issue #46, but a lot more book keeping.

@jonathf jonathf added the enhancement New feature or request label May 5, 2020
@tt-aiken
Copy link

Any ideas on the best way to go about resolving this? I'm happy to try out some approaches! As it's written, the _prod function makes executing chaospy.generate_expansion() prohibitively time-consuming above about 3,000 polynomials with a time complexity of about n_polynomials^3.

@jonathf
Copy link
Owner Author

jonathf commented Jan 27, 2023

The lowest hanging fruit for this is to update nu.mul to do convolution which reduces O(N^2) to O(N log N).

3 brown 1 blue has an excellent intro video on the topic and how FFT can be used to in polynomial multiplication:
https://www.youtube.com/watch?v=KuXjwB4LzSA
If you can get that to work, it will be a impressive win.

The much higher hanging fruit is to get rid of the for-loop/recursive style code and instead try to formulate the problem in such a way that it exploits numpys fast array operations. I have vague idea of how that is done, but not sure if it is possible or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants