Skip to content

feat: add normalized_cache to UltraCircuitBuilder #1384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Himess
Copy link

@Himess Himess commented May 9, 2025

Summary

Closes #1052

This PR introduces a normalized_cache mechanism to the UltraCircuitBuilder to support memoization of normalized witness variables.

Changes

  • Added normalized_cache as a member field in UltraCircuitBuilder.
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Caching field normalize and bigfield self_reduce
1 participant