Comment on page
Effective circuit development
Before generating the circuit,
assignerwill try to simplify the data structures and memory operations as much as possible. However, it is still recommended to avoid overcomplicated data structures. For example, if you have a
std::vector<std::vector<std::vector<int>>>it is better to use a single
When developing the algorithm remember that all integer types by default are being treated as field types. Unless they are being used by an intrinsic function that takes bit size into account.
They are free and can significantly reduce the circuit size.
Due to PLONK-ish gates nature, $N$ unique instructions are more expensive than $N$ identical instructions of the similar size.
In circuit form, const size containers have the same cost regardless of memory type they are using.
Before the code is transformed into the circuit - there is an additional layer of memory operations simplifying. That means that there is no difference in terms of circuits between
std::array<int, 10>- both these containers will be simplified to direct memory access.