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

[docs] Noir performance considerations #300

Closed
Tracked by #223
critesjosh opened this issue Jun 18, 2024 · 1 comment · Fixed by noir-lang/noir#5456
Closed
Tracked by #223

[docs] Noir performance considerations #300

critesjosh opened this issue Jun 18, 2024 · 1 comment · Fixed by noir-lang/noir#5456
Assignees
Labels
documentation Improvements or additions to documentation Noir Docs

Comments

@critesjosh
Copy link
Collaborator

critesjosh commented Jun 18, 2024

From tom on slack:

  • Try to avoid mutating arrays at unknown (until runtime) indices as this turns ROM into RAM which is more expensive. In this case it's best to construct the final output in an unconstrained function and then assert that it's correct.
  • Unconstrained gud, so also useful in non-array settings if you can prove the result cheaply once you know it.
  • Bitwise operations are bad and should be avoided if possible (notable as devs tend to use bitwise ops in an attempt to optimise their code)
  • We do as much compile-time execution as we can so calling "expensive" functions with constant arguments isn't a major concern and developers shouldn't feel the need to create hardcoded constants.
@critesjosh critesjosh added documentation Improvements or additions to documentation Noir Docs labels Jun 18, 2024
@jzaki
Copy link
Contributor

jzaki commented Jul 3, 2024

This ticket is about bringing general insights for developing Noir into the Noir docs. The draft hackmd consolidates and communicates key points from several Aztec devs.

github-merge-queue bot pushed a commit to noir-lang/noir that referenced this issue Jul 30, 2024
# Description

## Problem\*

Resolves AztecProtocol/dev-rel#300

## Summary\*

Documents Noir considerations vs regular procedural programming. Some
considerations specifically for Rust syntax conversion.

## Additional Context



## Documentation\*

Check one:
- [ ] No documentation needed.
- [x] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [ ] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.

---------

Co-authored-by: josh crites <jc@joshcrites.com>
Co-authored-by: Savio <72797635+Savio-Sou@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation Noir Docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants