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

Add support for weighting opcodes of different types differently when profiling #81

Open
TomAFrench opened this issue May 2, 2024 · 0 comments

Comments

@TomAFrench
Copy link
Member

We currently support reporting the number of opcodes on each line of Noir source, however a more useful metric is the number of constraints which these opcodes will generate. This is nontrivial as:

  • constraint counts vary by backend
  • certain opcodes have associated fixed costs which are shared between all others of that type.

It's then not possible to give an exact count, what we can do instead is allow an inexact estimation of the opcode->constraint conversion, i.e.:

  • Extension settings allows setting a weight for each opcode e.g. AssertZero == 1, Keccak256== 20000.
  • Reasonable defaults are provided for barretenberg which provides a reasonable estimation of the number of constraints each opcode produces.
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant