Skip to content

fix: constraint count regression introduced in commit 53f652b #53

Merged
kashbrti merged 2 commits intomainfrom
mc/reduce-gate-counts
Nov 15, 2024
Merged

fix: constraint count regression introduced in commit 53f652b #53
kashbrti merged 2 commits intomainfrom
mc/reduce-gate-counts

Conversation

@iAmMichaelConnor
Copy link
Copy Markdown
Collaborator

Changes in #44 inadvertently increased gate counts. This seems to fix it.

@iAmMichaelConnor iAmMichaelConnor changed the title Mc/reduce gate counts fix: constraint count regression introduced in commit 53f652b Nov 14, 2024
Comment thread src/bignum.nr
assert(params.has_multiplicative_inverse);
__batch_invert::<_, MOD_BITS, _>(params, x.map(|bn| Self::get_limbs_slice(bn).as_array()))
.map(|limbs| Self { limbs })
__batch_invert::<_, MOD_BITS, _>(params, x.map(|bn: Self| bn.limbs)).map(|limbs| {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hadn't appreciated you could put type annotations inside the closure |bn: T|. Pretty cool.

Copy link
Copy Markdown
Contributor

@kashbrti kashbrti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kashbrti kashbrti merged commit d81d5fa into main Nov 15, 2024
@github-actions github-actions bot mentioned this pull request Nov 15, 2024
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.

2 participants