diff --git a/src/field/extension_field/target.rs b/src/field/extension_field/target.rs index 1691fba2..9d078e15 100644 --- a/src/field/extension_field/target.rs +++ b/src/field/extension_field/target.rs @@ -151,6 +151,7 @@ impl, const D: usize> CircuitBuilder { sum } + /// TODO: Change this to using an `arithmetic_extension` function once `MulExtensionGate` supports addend. pub fn sub_extension( &mut self, mut a: ExtensionTarget, @@ -231,6 +232,7 @@ impl, const D: usize> CircuitBuilder { /// Like `mul_add`, but for `ExtensionTarget`s. Note that, unlike `mul_add`, this has no /// performance benefit over separate muls and adds. + /// TODO: Change this to using an `arithmetic_extension` function once `MulExtensionGate` supports addend. pub fn mul_add_extension( &mut self, a: ExtensionTarget, @@ -243,6 +245,7 @@ impl, const D: usize> CircuitBuilder { /// Like `mul_sub`, but for `ExtensionTarget`s. Note that, unlike `mul_sub`, this has no /// performance benefit over separate muls and subs. + /// TODO: Change this to using an `arithmetic_extension` function once `MulExtensionGate` supports addend. pub fn scalar_mul_sub_extension( &mut self, a: Target, diff --git a/src/gadgets/rotate.rs b/src/gadgets/rotate.rs index b7041510..12bf3bc0 100644 --- a/src/gadgets/rotate.rs +++ b/src/gadgets/rotate.rs @@ -7,6 +7,9 @@ impl, const D: usize> CircuitBuilder { /// Selects `x` or `y` based on `b`, which is assumed to be binary. /// In particular, this returns `if b { x } else { y }`. /// Note: This does not range-check `b`. + // TODO: This uses 10 gates per call. If addends are added to `MulExtensionGate`, this will be + // reduced to 2 gates. We could also use a new degree 2 `SelectGate` for this. + // If `num_routed_wire` is larger than 26, we could batch two `select` in one gate. pub fn select( &mut self, b: Target,