forked from iden3/circom
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
c++ generatorC++ GeneratorC++ Generator
Description
In the current implementation, the C++ generator does not include special handling for initializing constant arrays. Instead, the Circom compiler transforms constant declarations into a sequence of assignments to individual array elements. As a result, the C++ generator produces extremely large code for the POSEIDON_C function from the standard library—approximately 20,000 lines. This causes the C++ compiler to take an excessively long time to compile (it did not finish even after 6 hours).
We need to do the following:
- Disable the transformation of constants into assignments in the Circom compiler.
- Generate static variables for all constants, including arrays.
- Try to avoid array copies in the POSEIDON_C function. This can be done by returning a reference to the constant array instead of a copy.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c++ generatorC++ GeneratorC++ Generator