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

Feat: Add Gruen's Sumcheck Optimisation #567

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions jolt-core/src/poly/split_eq_poly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,21 @@ impl<F: JoltField> SplitEqPolynomial<F> {
DensePolynomial::new(merged)
}
}

/// Drop the first variable from E1 or E2 table for Gruen's optimization
/// Before n/2: E1⁽ⁱ⁺¹⁾[x'] = eq(w[i+2:n/2], x')
/// After n/2: E2⁽ⁱ⁺¹⁾[x'] = eq(w[i+2:n], x')
pub fn drop_next_variable(&mut self) {
if self.E1_len > 1 {
// Still in first phase (before n/2)
self.E1 = EqPolynomial::evals(&self.E1[1..self.E1_len]);
self.E1_len -= 1;
} else {
// In second phase (after n/2)
self.E2 = EqPolynomial::evals(&self.E2[1..self.E2_len]);
self.E2_len -= 1;
}
}
}

#[cfg(test)]
Expand Down
Loading