barretenberg icon indicating copy to clipboard operation
barretenberg copied to clipboard

Caching field normalize and bigfield self_reduce

Open Rumata888 opened this issue 1 year ago • 1 comments

Currently we just add constraints and return new elements when we normalize field elements and reduce bigfield elements. This means that a call to the same field element twice to normalize it can produce 2 sets of identical constraints. Ideally, we would cache the result and just return it

Rumata888 avatar Jul 15 '24 16:07 Rumata888

@suyash67 Did you guys discuss this issue and decide against?

ledwards2225 avatar Jul 03 '25 20:07 ledwards2225

Yes. Although this could be very useful, but adding such a flag can be very error-prone, especially at this stage. Hence, closing.

suyash67 avatar Sep 11 '25 11:09 suyash67