-
Notifications
You must be signed in to change notification settings - Fork 255
feat: better parallelism and miscellaneous optimizations #870
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
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.
just a couple of nits
OneHot(OneHotPolynomial<F>), | ||
OneHot(Arc<OneHotPolynomial<F>>), |
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.
can we avoid putting the Arc here (i.e. only introduce Arc when doing linear_combination
?)
jolt-core/src/poly/opening_proof.rs
Outdated
.polynomials | ||
.par_iter() | ||
.map(|label| polynomials_map.get(label).unwrap()) | ||
.map(|label| Arc::new(polynomials_map.get(label).unwrap().clone())) |
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.
If we separate MultilinearPolynomial::linear_combination
into two different functions:
RLCPolynomial::from_linear_combination(polynomials: Vec<Arc<MultilinearPolynomial<F>>>, coefficients: &[F])
and DensePolynomial::from_linear_combination(polynomials: &[&MultilinearPolynomial<F>], coefficients: &[F])
, then we'd be able to avoid the clone
here
linear_combination
from 40s at 2^28 to ~1s