When compiling the MidenVM constraints currently done towards the Plonky3 backend, the generated constraints represent ~70 individual constraints.
However, the RPO constraints are written in a way that makes it hard to load (one constraint being represented with 1 line of 80k+ caracters).
We should maybe better optimize some expressions. For instance, we could improve the Common SubExpression Elimination: currently, it deduplicates nodes in the algebraic graph, but the codegen duplicates the generated Rust code back.
Using Rust let statements when a node is duplicated (maybe with some stricter conditions such as "this node should be referenced more than 10 times in the graph to have a dedicated let statement") would certainly improve readability.
The main issue I think would be that the variable names would probably not be made easily readable.
When compiling the MidenVM constraints currently done towards the Plonky3 backend, the generated constraints represent ~70 individual constraints.
However, the RPO constraints are written in a way that makes it hard to load (one constraint being represented with 1 line of 80k+ caracters).
We should maybe better optimize some expressions. For instance, we could improve the Common SubExpression Elimination: currently, it deduplicates nodes in the algebraic graph, but the codegen duplicates the generated Rust code back.
Using Rust
letstatements when a node is duplicated (maybe with some stricter conditions such as "this node should be referenced more than 10 times in the graph to have a dedicated let statement") would certainly improve readability.The main issue I think would be that the variable names would probably not be made easily readable.