-
Notifications
You must be signed in to change notification settings - Fork 235
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
Fix degree bug, and add benchmarks of polynomial add/sub/neg #119
Conversation
Hmm I wonder if parallelizing these cheap operations would give better speedups if we used this to increase the amount of computation on each thread |
I'll add benchmarks to see how it behaves with and without that. |
Based on benchmarks for small sized polynomials, definitely appears like we should be using that for small polynomials. Results of parallel addition speeds on the benchmark server:
For reference, heres the serial times:
Should we block merging this PR until we update |
65c4440
to
6c6efbe
Compare
|
Hrmm, looks like We should probably change add an ark_std macro for
And the minimum length being really large (like 2**20)? Alternatively I can just undo the parallelization in this PR, and just copy over polynomial benchmark infra, and bug fixes |
Something seems very wrong about these
|
Hmm I think the overhead of parallelization is causing issues here. I think for these ops it's fine to leave them as not parallel, because they'll be dominated by other stuff anyway. |
Yeah, that sounds good to me. I'll remove the parallelization, but keep the bug fixes + benchmarks |
.zip(&self.coeffs) | ||
.for_each(|(a, b)| { | ||
*a += b; | ||
}); |
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.
Should I undo changes like this?
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.
nah this is fine
Description
Parallelize
Add
,Sub
,AddAssign
,SubAssign
,Neg
operations on DensePolynomial.Furthermore fix bugs in degree calculation when you have dense polynomial addition / subtraction that causes the leading coefficient to be 0.
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