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: experimental acir optimisation #6341

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Conversation

guipublic
Copy link
Contributor

Description

Problem*

Related to #6085

Summary*

This PR is an attempt to perform the 'as_witness' automatically.
The idea is to create witness for each common expression, instead of having the user to specify the expressions to fit into a witness. Because this strategy generates a lot of 'small' arithmetic opcodes, I benefit from the big-add-gate (cf. #6085) by simplifying those small opcodes into the ones which use them.

Additional Context

In general this optimisation works well, but some corner cases still need to be investigated. Indeed, the simplification may generate too many opcodes which do not fit the width.
Hence, it is hidden by a non-documented compiler option (experimental-optimisation).
I leave it as a draft for now.

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

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

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