barretenberg
barretenberg copied to clipboard
feat: add normalized_cache to UltraCircuitBuilder
Summary
Closes #1052
This PR introduces a normalized_cache mechanism to the UltraCircuitBuilder to support memoization of normalized witness variables.
Changes
- Added
normalized_cacheas a member field inUltraCircuitBuilder. - Implemented the following methods:
-
has_normalized(...) -
get_normalized(...) -
cache_normalized(...)
-
- All methods are field-agnostic and templated over
ExecutionTrace.
Motivation
The cache allows the builder to reuse previously computed normalized values, avoiding redundant work and improving performance in cases where normalization is invoked multiple times for the same inputs.