-
Notifications
You must be signed in to change notification settings - Fork 54
[docs] Noir performance considerations #300
Copy link
Copy link
Closed
noir-lang/noir
#5456Labels
Noir DocsdocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Noir DocsdocumentationImprovements or additions to documentationImprovements or additions to documentation