Skip to content
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

feat: remove unnecessary usage of slices #104

Merged
merged 3 commits into from
Jan 21, 2025
Merged

feat: remove unnecessary usage of slices #104

merged 3 commits into from
Jan 21, 2025

Conversation

TomAFrench
Copy link
Member

@TomAFrench TomAFrench commented Jan 20, 2025

Description

Problem*

Resolves

Summary*

These calls are hiding an unnecessary conversion from arrays to slices and back to arrays. Instead we can now just move the array into the bignum.

This drops number of opcodes for the below program by 10% from 636 to 573

unconstrained fn main(a: Fq, b: Fq) -> pub Fq {
    a.__add(b)
}

Additional Context

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

Copy link
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 fb6f9e5 into main Jan 21, 2025
8 checks passed
@kashbrti kashbrti deleted the tf/remove-slices branch January 21, 2025 11:19
@github-actions github-actions bot mentioned this pull request Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants