-
Notifications
You must be signed in to change notification settings - Fork 256
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
Add polynomial benchmark infra, switch poly eval to horners methods #114
Conversation
Ah didn't realize cfg_into_iter handled parallelization, forgot to test with the parallelization feature. I'll add parallelization in |
The parallel implementation is even more of a speedup! On my 16 core laptop, parallel horners method is a 5x speedup over the current parallel method.
|
Looking into why the parallel speedup was so high, it turns out that the prior polynomial.evaluate was only half parallelized. The computation of all powers |
Locally, using |
On the benchmark server there was essentially no speed difference, so the |
Awesome, thanks! Final point: should we extract the common core of both versions of the internal_evaluate algorithms into a separate method? |
Sure |
Oh and finally, do you think if we use |
We'd have to add a I'd prefer to merge this as is, and then update usages here after such an update to |
Description
This adds infrastructure for benchmarking polynomial operations across polynomial degrees. Furthermore, it switches polynomial evaluation to use horner's method, which both makes evaluation take constant memory, but also results in a 2x speed improvement on my laptop. Benchmark results for serial polynomial evaluation with Horners method (with outlier messages trimmed):
Additionally this PR implements a fully parallelized implementation of single point evaluation.
closes: #85
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
Pending
section inCHANGELOG.md
Files changed
in the Github PR explorer