mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-03 14:23:07 +00:00
Small fix in arithmetic_extension_special_cases (#140)
This is detecting the case where we multiply something by 1 and add 0. In that case we can just return the thing being multiplied by 1. We were using the wrong constant to detect this. Reduces the cost of `compute_evaluation` from 8 to 6 gates.
This commit is contained in:
parent
94b85b0806
commit
36a1386c6f
@ -143,7 +143,7 @@ impl<F: Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||
}
|
||||
}
|
||||
if let Some(x) = mul_1_const {
|
||||
if (x * const_1.into()).is_one() {
|
||||
if (x * const_0.into()).is_one() {
|
||||
return Some(multiplicand_0);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user