Skip to content

Commit

Permalink
logup sum (#917)
Browse files Browse the repository at this point in the history
  • Loading branch information
ohad-starkware authored Dec 2, 2024
1 parent 5f5a02f commit df4a642
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/prover/src/constraint_framework/logup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ pub type ClaimedPrefixSum = (SecureField, usize);
// (total_sum, claimed_sum)
pub type LogupSums = (SecureField, Option<ClaimedPrefixSum>);

pub trait LogupSumsExt {
fn value(&self) -> SecureField;
}

impl LogupSumsExt for LogupSums {
fn value(&self) -> SecureField {
self.1.map(|(claimed_sum, _)| claimed_sum).unwrap_or(self.0)
}
}

/// Evaluates constraints for batched logups.
/// These constraint enforce the sum of multiplicity_i / (z + sum_j alpha^j * x_j) = claimed_sum.
pub struct LogupAtRow<E: EvalAtRow> {
Expand Down

1 comment on commit df4a642

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: df4a642 Previous: cd8b37b Ratio
merkle throughput/simd merkle 29260812 ns/iter (± 459622) 13712527 ns/iter (± 579195) 2.13

This comment was automatically generated by workflow using github-action-benchmark.

CC: @shaharsamocha7

Please sign in to comment.