AztecProtocol / barretenberg

Apache License 2.0
132 stars 81 forks source link

Caching field normalize and bigfield self_reduce #1052

Open Rumata888 opened 1 month ago

Rumata888 commented 1 month ago

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