Skip to content

Conversation

@berZKerk
Copy link

Motivation

The current implementation uses random_elements[1].powers() iterator that computes powers on-the-fly, which is inefficient in inner loops. There's a TODO comment explicitly requesting this optimization.

Solution

Pre-compute beta powers (up to 16) and store in vector instead of using iterator. This avoids repeated computation in loops while maintaining same functionality.

Changes:

  • populate_local_permutation_row: Replace powers() iterator with pre-computed vector
  • eval_permutation_constraints: Apply same optimization
  • Add explanatory comments

PR Checklist

  • Added Tests (existing tests pass)
  • Added Documentation (no documentation changes needed)
  • Breaking changes (no breaking changes)

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.

1 participant