Skip to content

Commit

Permalink
optimize dsl code
Browse files Browse the repository at this point in the history
  • Loading branch information
MonkeyKing-1 committed Jan 7, 2025
1 parent 319ee99 commit dcc4b28
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions extensions/native/recursion/src/fri/two_adic_pcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,17 @@ pub fn verify_two_adic_pcs<C: Config>(
let ps_at_z = builder.get(&mat_values, l);

builder.cycle_tracker_start("single-reduced-opening-eval");

if builder.flags.static_only {
let n: Ext<C::F, C::EF> = builder.constant(C::EF::ZERO);
builder.range(0, ps_at_z.len()).for_each(|t, builder| {
let p_at_x = builder.get(&mat_opening, t);
let p_at_z = builder.get(&ps_at_z, t);
let quotient = (p_at_z - p_at_x) / (z - x);
// let quotient = (p_at_z - p_at_x) / (z - x);

builder.assign(&cur_ro, cur_ro + cur_alpha_pow * quotient);
builder.assign(&n, cur_alpha_pow * (p_at_z - p_at_x) + n);
builder.assign(&cur_alpha_pow, cur_alpha_pow * alpha);
});
builder.assign(&cur_ro, cur_ro + n / (z - x));
} else {
let mat_ro = builder.fri_single_reduced_opening_eval(
alpha,
Expand Down

0 comments on commit dcc4b28

Please sign in to comment.